Data.SqlExpr.TSchemaType

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

TSchemaType = (stNoSchema, stTables, stSysTables, stProcedures, stColumns,
stProcedureParams, stIndexes, stPackages, stUserNames);

C++

enum DECLSPEC_DENUM TSchemaType : unsigned char { stNoSchema, stTables, stSysTables, stProcedures, stColumns, stProcedureParams, stIndexes, stPackages, stUserNames };

Properties

Type Visibility Source Unit Parent
enum public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr Data.SqlExpr

Description

TSchemaType and TSchemaInfo describe schema information (metadata) to access using dbXpress.

Use TSchemaInfo to describe the metadata you want to fetch from a database server when you are using an SQL dataset. TSchemaInfo has three members: FType, ObjectName, and Pattern, which are described below.

Use TSchemaInfo to describe the metadata you want to fetch from a database server when you are using an SQL dataset. TSchemaInfo has four members: FType, ObjectName, Pattern, and PackageName, which are described below.

FType is of type TSchemaType. It identifies the type of information you want. It can have any of the following values:



Value Description

stNoSchema

No schema information. When FType is stNoSchema, the SQL dataset is populated with the results of its query or stored procedure rather than metadata from the server.

stTables

Information about all the data tables on the database server that match the criteria specified by the SQL connection's TableScope property.

stSysTables

Information about all of the system tables on the database server. Not all servers use system tables to store metadata. Requesting a list of system tables from a server that does not use them results in an empty dataset.

stProcedures

Information about all of the stored procedures on the database server.

stColumns

Information about all of the columns (fields) in a specified table.

stProcedureParams

Information about all of the parameters of a specified stored procedure.

stIndexes

Information about all of the indexes defined for a specified table.

stPackages

Information about all of the packages defined on the database server (Oracle only).



ObjectName is the name of the table or stored procedure about whose columns, indexes, or parameters you want information. When FType is stColumns or stIndexes, ObjectName is the name of a table. When FType is stProcedureParams, ObjectName is the name of a stored procedure. When FType is stNone, stTables, stSysTables, or stProcedures, ObjectName is ignored.

Pattern is an SQL pattern mask that limits the items returned. The name of each item (table, stored procedure, field, parameter, or index) must match this pattern mask or it does not appear as a record when the SQL dataset is opened. Pattern uses the wildcards '%' (to match a string of arbitrary characters of any length) and '_' (to match a single arbitrary character). To use a literal percent or underscore in a pattern, the character is doubled (%% or __). If you do not want to use a pattern, set Pattern to nil (Delphi) or NULL (C++).

PackageName is the name of an Oracle package that contains the stored procedure about which you are requesting information. This member is used when FType is stProcedures or stProcedureParams. PackageName is ignored if the server is not an Oracle database.