mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 16:43:03 +01:00
Fixes to RDB$SQL package.
This commit is contained in:
parent
7d13f3fb12
commit
e392484582
@ -19,14 +19,14 @@ Output parameters:
|
|||||||
- `LEVEL` type `INTEGER NOT NULL` - indentation level (may have gaps in relation to parent's level)
|
- `LEVEL` type `INTEGER NOT NULL` - indentation level (may have gaps in relation to parent's level)
|
||||||
- `PACKAGE_NAME` type `RDB$PACKAGE_NAME` - package name of a stored procedure
|
- `PACKAGE_NAME` type `RDB$PACKAGE_NAME` - package name of a stored procedure
|
||||||
- `OBJECT_NAME` type `RDB$RELATION_NAME` - object (table, procedure) name
|
- `OBJECT_NAME` type `RDB$RELATION_NAME` - object (table, procedure) name
|
||||||
- `ALIAS` type `RDB$RELATION_NAME` - alias name
|
- `ALIAS` type `RDB$SHORT_DESCRIPTION` - alias name
|
||||||
- `RECORD_LENGTH` type `INTEGER` - record length for the record source
|
- `RECORD_LENGTH` type `INTEGER` - record length for the record source
|
||||||
- `KEY_LENGTH` type `INTEGER` - key length for the record source
|
- `KEY_LENGTH` type `INTEGER` - key length for the record source
|
||||||
- `ACCESS_PATH` type `VARCHAR(255) CHARACTER SET UTF8 NOT NULL` - friendly plan description
|
- `ACCESS_PATH` type `RDB$DESCRIPTION NOT NULL` - friendly plan description
|
||||||
|
|
||||||
```
|
```
|
||||||
select *
|
select *
|
||||||
from rdb$sql.explain('select * from employees where id = ?');
|
from rdb$sql.explain('select * from employee where emp_no = ?');
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
@ -34,9 +34,9 @@ select *
|
|||||||
from rdb$sql.explain(q'{
|
from rdb$sql.explain(q'{
|
||||||
select *
|
select *
|
||||||
from (
|
from (
|
||||||
select name from employees
|
select full_name name from employee
|
||||||
union all
|
union all
|
||||||
select name from customers
|
select customer name from customer
|
||||||
)
|
)
|
||||||
where name = ?
|
where name = ?
|
||||||
}');
|
}');
|
||||||
|
@ -184,9 +184,9 @@ SqlPackage::SqlPackage(MemoryPool& pool)
|
|||||||
{"PARENT_RECORD_SOURCE_ID", fld_gen_val, true},
|
{"PARENT_RECORD_SOURCE_ID", fld_gen_val, true},
|
||||||
{"LEVEL", fld_integer, false},
|
{"LEVEL", fld_integer, false},
|
||||||
{"OBJECT_TYPE", fld_obj_type, true},
|
{"OBJECT_TYPE", fld_obj_type, true},
|
||||||
{"PACKAGE_NAME", fld_r_name, true},
|
{"PACKAGE_NAME", fld_pkg_name, true},
|
||||||
{"OBJECT_NAME", fld_r_name, true},
|
{"OBJECT_NAME", fld_r_name, true},
|
||||||
{"ALIAS", fld_r_name, true},
|
{"ALIAS", fld_short_description, true},
|
||||||
{"CARDINALITY", fld_statistics, true},
|
{"CARDINALITY", fld_statistics, true},
|
||||||
{"RECORD_LENGTH", fld_integer, true},
|
{"RECORD_LENGTH", fld_integer, true},
|
||||||
{"KEY_LENGTH", fld_integer, true},
|
{"KEY_LENGTH", fld_integer, true},
|
||||||
|
@ -52,7 +52,7 @@ private:
|
|||||||
(FB_SMALLINT, objectType)
|
(FB_SMALLINT, objectType)
|
||||||
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), packageName)
|
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), packageName)
|
||||||
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), objectName)
|
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), objectName)
|
||||||
(FB_INTL_VARCHAR(METADATA_IDENTIFIER_CHAR_LEN * METADATA_BYTES_PER_CHAR, CS_METADATA), alias)
|
(FB_INTL_VARCHAR(255 * METADATA_BYTES_PER_CHAR, CS_METADATA), alias)
|
||||||
(FB_DOUBLE, cardinality)
|
(FB_DOUBLE, cardinality)
|
||||||
(FB_INTEGER, recordLength)
|
(FB_INTEGER, recordLength)
|
||||||
(FB_INTEGER, keyLength)
|
(FB_INTEGER, keyLength)
|
||||||
|
Loading…
Reference in New Issue
Block a user