Skip to content

Add view or stored procedure to generate DDL scripts #7420

Open
@livius2

Description

@livius2

At first it is not about INFORMATION_SCHEMA and not about ISQL.

Currently multiple software must reinvent the wheel and analize what some information in system tables mean.
Will be good to change this state and provide system views or maybe better stored procedures to generate informations like:

  1. Table script (full with fields and its types)
  2. Table Field script (type, default, domain)
  3. Stored procedure script (full with parameters and its types
  4. Trigger script
  5. Index script
  6. .....

The most important i think is FieldType.

Now we must analyse system tables and look Field type 87 is this, field type 128 is something else.
With above stored procedures we will got
RDB$GET_INFO_TABLE_FIELD('TABLE_NAME', 'FIELD_NAME) and as result e.g.
FULL_TYPE: VARCHAR(80) CHARACTER SET WIN1250 COLLATE PXW_PLK
TYPE: VARCHAR(80)
DOMAIN: PERSON_NAME
DEFAULT: NULL
CHARACTER_SET: WIN1250
COLLATION: PXW_PLK

Consider even if this is not the sql manager software you can have in developement time requirments like this:
dynnamically create execute block with returning parameters.
Now you must do same job as sql manager software and analyse data to create appropiate parameter type. E.g. Numeric(18,2) VarChar(120) ....
It should generate valid sql script in Firebird terms to create some object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions