## get_schema

Returns a GdaDataModel with the schema information requested. You can view the list of features in `gda-connection.h`, enumeration GdaConnectionSchema. This schema information is what describes the objects in the database, and is the way applications can manage the structure of several database systems without knowing anything about their specific way of retrieving this information.

The `get_schema` virtual method gets a GdaConnectionSchema argument, which describes the kind of schema the client making the call is interested in, along with a GdaParameterList argument, which contains the list of arguments sent by the user to explicitly provide more information for the search.

The information to be returned for each schema, along with the supported parameters, is described in the following table.

Table 13. Standard Schema and supported parameters

Object type | GDA identifier | Supported Parameters | Returned fields
--- | --- | --- | ---
Databases | `GDA_CONNECTION_SCHEMA_DATABASES` |  | name
Schemas (also namespaces), a feature supported by Postgres which allows to define multiple domains within a single database | `GDA_CONNECTION_SCHEMA_NAMESPACES` |  | name
Tables | `GDA_CONNECTION_SCHEMA_TABLES` | "name" (name of table, optional) | name, owner, comments, SQL definition
Tables' parents | `GDA_CONNECTION_SCHEMA_PARENT_TABLES` | "name" (name of table, optional) | name, order of inheritance
Views | `GDA_CONNECTION_SCHEMA_VIEWS` | "name" (name of view, optional) | name, owner, comments, SQL definition
Table (or view) fields | `GDA_CONNECTION_SCHEMA_FIELDS` | "name" (name of table (or view), required) | name, type, size, scale, not null?, primary key?, unique index?, references, default value, comma separated extra attributes (AUTO_INCREMENT)
Sequences | `GDA_CONNECTION_SCHEMA_SEQUENCES` | "name" (name of sequence, optional) | name, owner, comments, SQL definition
Procedures | `GDA_CONNECTION_SCHEMA_PROCEDURES` | "name" (name of procedure, optional) | name, unique id, owner, comments, return type, number of arguments, arguments types (arguments types in the order, comma separated) and SQL definition. For the arguments where any type is accepted, '-' is returned as type.
Aggregates | `GDA_CONNECTION_SCHEMA_AGGREGATES` | "name" (name of aggregate, optional) | name, unique id, owner, comments, return type, argument type, SQL definition. If the argument can be of any type, then '-' is returned as type.
Types | `GDA_CONNECTION_SCHEMA_TYPES` | "name" (name of type, optional) | name, owner, comments, GDA type, synonyms (comma separated)
Tables' constraints | `GDA_CONNECTION_SCHEMA_CONSTRAINTS` | "name" (name of table) | constraint name, constraint type (FOREIGN_KEY, PRIMARY_KEY, UNIQUE, CHECK), on fields (comma separated), definition, options (ON_UPDATE_*, ON_DELETE_*, DEFERRABLE, INITIALLY_DEFERRED)