22.6 ADD_TABLE Procedure
This procedure adds a destination table for the generated data.
Syntax
APEX_DG_DATA_GEN.ADD_TABLE (
p_blueprint IN VARCHAR2,
p_sequence IN PLS_INTEGER,
p_table_name IN VARCHAR2,
p_preserve_case IN VARCHAR2 DEFAULT 'N',
p_display_name IN VARCHAR2 DEFAULT NULL,
p_singular_name IN VARCHAR2 DEFAULT NULL,
p_plural_name IN VARCHAR2 DEFAULT NULL,
p_rows IN NUMBER DEFAULT 0,
p_max_rows IN NUMBER DEFAULT NULL,
p_use_existing_table IN VARCHAR2 DEFAULT 'N',
p_exclude_columns IN wwv_flow_t_varchar2 DEFAULT c_empty_t_varchar2,
p_table_id OUT NUMBER )
Parameters
Table 22-6 ADD_TABLE Parameters
Parameter | Description |
---|---|
p_blueprint |
Identifier for the blueprint. |
p_sequence |
1 for first table, 2 for second, and so forth. |
p_table_name |
Name of table that can exist or not exist. |
p_preserve_case |
Defaults to N , which forces table name to uppercase. If Y , perserves casing of parameter.
|
p_display_name |
Friendly display name. |
p_singular_name |
Singluar friendly name. |
p_plural_name |
Plural friendly name. |
p_rows |
Number of rows to generate for this table. |
p_max_rows |
If null , then p_rows determines the number of rows, otherwise random rows between p_rows and p_max_rows are used when generating output.
|
p_use_existing_table |
If The automatic blueprint column creation supports the following data source mapping rules:
|
p_exclude_columns |
String array (apex_t_varchar2 ) of column names to exclude from the automatic column generation.
|
p_table_id |
ID of the added table (OUT ).
|
Example
DECLARE
l_table_id number;
BEGIN
apex_dg_data_gen.add_table(
p_blueprint => 'Cars',
p_sequence => 1,
p_table_name => 'my_cars',
p_rows => '50',
p_table_id => l_table_id);
apex_dg_data_gen.add_table(
p_blueprint => 'Cars',
p_sequence => 1,
p_table_name => 'my_cars',
p_rows => '50',
p_use_existing_table => 'Y',
p_table_id => l_table_id
);
apex_dg_data_gen.add_table(
p_blueprint => 'Cars',
p_sequence => 1,
p_table_name => 'my_cars',
p_rows => '50',
p_use_existing_table => 'Y',
p_exclude_columns => apex_t_varchar2('CREATED_BY','CREATED_DATE'),
p_table_id => l_table_id
);
END;
Parent topic: APEX_DG_DATA_GEN