Table of Contents

Class bpxCatalog

Namespace
PolarDataInterop.Catalog
Assembly
PolarDataInterop.dll

The catalog contains information about the tables and views in a database.

public class bpxCatalog
Inheritance
bpxCatalog
Inherited Members
Extension Methods

Properties

Catalogs

Returns a collection of strings with the names of all catalogs on this server.

public Collection<string> Catalogs { get; }

Property Value

Collection<string>

Connection

Gets the connection used to communicate with the database.

public PolarConnection Connection { get; }

Property Value

PolarConnection

Schemas

Returns a collection of strings for the schemas found in this catalog.

public Collection<string> Schemas { get; }

Property Value

Collection<string>

SelectedCatalog

Gets/sets the current catalog to use.

public string SelectedCatalog { get; set; }

Property Value

string

SelectedSchema

Gets/sets the schema to use for this catalog.

public string SelectedSchema { get; set; }

Property Value

string

Tables

Returns a collection of all tables in the selected catalog/schema.

public Collection<bpxTable> Tables { get; }

Property Value

Collection<bpxTable>

Methods

CreateDatabaseSQL(bool)

This method creates the SQL statements to create a database based on the current database.

public string CreateDatabaseSQL(bool pCreateData = true)

Parameters

pCreateData bool

If this parameter is set to true (default), also insert-statements are created to insert all data.

Returns

string

A SQL script with all sql commands to create this database.

GetField(string, string)

Gets a field from the catalog.

public bpxField GetField(string pTableNameExpression, string pFieldName)

Parameters

pTableNameExpression string

An expression identifying the table, like: CatalogName.SchemaName.TableName SchemaName.TableName TableName

pFieldName string

The name of the field to get.

Returns

bpxField

The specified field in the specified table (or Nothing if not found).

GetTable(string)

Gets a table from the catalog.

public bpxTable GetTable(string pTableNameExpression)

Parameters

pTableNameExpression string

An expression identifying the table, like: CatalogName.SchemaName.TableName SchemaName.TableName TableName

Returns

bpxTable

The table (or nothing if not found)

GetTableForQuery(string)

Returns a catalog-table object for the specified query.

public bpxTable GetTableForQuery(string pQuery)

Parameters

pQuery string

The query to create a catalog-table for.

Returns

bpxTable

The catalog table for the query.

ToString()

public override string ToString()

Returns

string