DBPowerSuite 7.9 Application Programming Interface
ODBC

 

Class Name

OCatalogStatement

Parent Class

OStatement

Header Name

OCatalogStatement.h

Language

C++

Author

Brian N. Ceccarelli

Date Written

October 8, 2001

Last Updated

January 12, 2007

Last Updated By

Brian Ceccarelli

Notes

      This class retrieves data structures at the ODBC data source
level.   For instance, one of the methods in this class retrieves
all the names of the catalogs supported in the ODBC data source.

      The ODBC naming convention for its internal structures
parallel that of Sybase or MS SQL Server.  Here are the
parallels:

ODBC                        Sybase

DataSource                  Server
Catalog                     Database
Schema                      Owner
Table                       Table

 

Public Methods of Class OCatalogStatement

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

OCatalogStatement(OConnection& odbc_connection)

Constructor

2

No

No

Yes

ps_int32 ocsDoesIndexExist(const ps_char* table_name, const ps_char* index_name, ps_int8& sw)

Does the Index Exist

3

No

No

Yes

ps_int32 ocsDoesProcedureExist(const ps_char* procedure_name, ps_int8& sw)

Does the Procedure Exist

4

No

No

Yes

ps_int32 ocsDoesTableExist(const ps_char* table_name, ps_int8& sw)

Does the Table Exist

5

No

No

Yes

ps_int32 ocsDoesViewExist(const ps_char* view_name, ps_int8& sw)

Does the View Exist

6

No

No

Yes

ps_int32 ocsGetCatalogList(ODBC_CATALOG_LIST& list, const ps_char* name_pattern = "%")

Get Catalog List

7

No

No

Yes

ps_int32 ocsGetColumnList(ODBC_COLUMN_LIST& list, const ps_char* catalog_name, const ps_char* schema_name, const ps_char* table_name, ps_int32 sort_flag = PS_ODBC_NO_SORT)

Get Column List

8

No

No

Yes

ps_int32 ocsGetCurrentSchemaName(ps_char* user_name)

Get Current Schema Name

9

No

No

Yes

ps_int32 ocsGetForeignKeyList(ODBC_FKEY_LIST& list, const ps_char* schema_name_pattern = "%", const ps_char* table_name_pattern = "%")

Get Foreign Key List

10

No

No

Yes

ps_int32 ocsGetIndexList(ODBC_INDEX_LIST& list, const ps_char* schema_name_pattern = "%", const ps_char* table_name_pattern = "%")

Get Index List

11

No

No

Yes

ps_int32 ocsGetPrimaryKey(ODBC_PKEY& pkey, const ps_char* catalog_name = "%", const ps_char* schema_name_pattern = "%", const ps_char* table_name_pattern = "%")

Get Primary Key

12

No

No

Yes

ps_int32 ocsGetProcedureColumnList(ODBC_PROCEDURE_COLUMN_LIST& list, const ps_char* catalog_name, const ps_char* schema_name, const ps_char* procedure_name, ps_int32 sort_flag = PS_ODBC_NO_SORT)

Get Procedure Column List

13

No

No

Yes

ps_int32 ocsGetProcedureList(ODBC_PROCEDURE_LIST& list, const ps_char* schema_name_pattern = "%", const ps_char* procedure_name_pattern = "%", ps_int32 sort_flag = PS_ODBC_NO_SORT)

Get Procedure List

14

No

No

Yes

ps_int32 ocsGetSchemaList(ODBC_SCHEMA_LIST& list, const ps_char* name_pattern = "%")

Get Schema List

15

No

No

Yes

ps_int32 ocsGetTableList(ODBC_TABLE_LIST& list, const ps_char* schema_name_pattern = "%", const ps_char* table_name_pattern = "%", const ps_char* table_name_exclude_pattern = NULL, ps_int32 sort_flag = PS_ODBC_CI_SORT)

Get Table List

16

No

No

Yes

ps_int32 ocsGetViewList(ODBC_VIEW_LIST& list, const ps_char* schema_name_pattern = "%", const ps_char* view_name_pattern = "%", const ps_char* view_name_exclude_pattern = NULL, ps_int32 sort_flag = PS_ODBC_CI_SORT)

Get View List

17

No

No

Yes

ps_int32 ocsTruncateTable(const ps_char* table_name)

Truncate Table

18

No

No

No

~OCatalogStatement()

Destructor

 

Protected Methods of Class OCatalogStatement

#

Inline

Pure Virtual

Virtual

Method

Description

1

No

No

No

ps_int32 ocsSort(ODBC_VIEW_LIST* list, ps_int32 sort_flag)

Sort Column List

2

No

No

No

ps_int32 ocsSort(ODBC_TABLE_LIST* list, ps_int32 sort_flag)

Sort Column List

3

No

No

No

ps_int32 ocsSort(ODBC_COLUMN_LIST* list, ps_int32 sort_flag)

Sort Column List

4

No

No

No

ps_int32 ocsSort(ODBC_PROCEDURE_LIST* list, ps_int32 sort_flag)

Sort Column List

5

No

No

No

ps_int32 ocsSort(ODBC_PROCEDURE_COLUMN_LIST* list, ps_int32 sort_flag)

Sort Column List

 

Private Methods of Class OCatalogStatement

#

Inline

Pure Virtual

Virtual

Method

Description

 

Go to DBPowerSuite 7.9 Application Programming Interface.


Updated: Thu Jun 18 21:13:23 2009