LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Attributes | List of all members
dbahsql::SchemaParser Class Reference

#include <parseschema.hxx>

Public Member Functions

 SchemaParser (css::uno::Reference< css::embed::XStorage > &rStorage)
 
void parseSchema ()
 Parses table definitions contained by a file called "script" in storage. More...
 
const SqlStatementVectorgetCreateStatements () const
 
const SqlStatementVectorgetAlterStatements () const
 
std::vector< ColumnDefinitiongetTableColumnTypes (const OUString &sTableName) const
 Returns the column types of a table. More...
 
const std::map< OUString, std::vector< sal_Int32 > > & getTableIndexes () const
 Returns a vector of indexes for each table. More...
 
const std::map< OUString, std::vector< OUString > > & getPrimaryKeys () const
 Returns a vector of column names for each table. More...
 

Private Attributes

css::uno::Reference< css::embed::XStorage > & m_rStorage
 
std::map< OUString, std::vector< ColumnDefinition > > m_ColumnTypes
 
std::map< OUString, std::vector< sal_Int32 > > m_Indexes
 
std::map< OUString, std::vector< OUString > > m_PrimaryKeys
 
SqlStatementVector m_sCreateStatements
 
SqlStatementVector m_sAlterStatements
 

Detailed Description

Definition at line 22 of file parseschema.hxx.

Constructor & Destructor Documentation

◆ SchemaParser()

dbahsql::SchemaParser::SchemaParser ( css::uno::Reference< css::embed::XStorage > &  rStorage)
explicit

Definition at line 112 of file parseschema.cxx.

References m_rStorage.

Member Function Documentation

◆ getAlterStatements()

const SqlStatementVector & dbahsql::SchemaParser::getAlterStatements ( ) const
inline
Returns
A vector of alter SQL strings in Firebird dialect.

Definition at line 55 of file parseschema.hxx.

References m_sAlterStatements.

◆ getCreateStatements()

const SqlStatementVector & dbahsql::SchemaParser::getCreateStatements ( ) const
inline
Returns
A vector of schema definition SQL strings in Firebird dialect.

Definition at line 50 of file parseschema.hxx.

References m_sCreateStatements.

◆ getPrimaryKeys()

const std::map< OUString, std::vector< OUString > > & dbahsql::SchemaParser::getPrimaryKeys ( ) const

Returns a vector of column names for each table.

These columns are the primary keys of the table.

Definition at line 198 of file parseschema.cxx.

References m_PrimaryKeys.

◆ getTableColumnTypes()

std::vector< ColumnDefinition > dbahsql::SchemaParser::getTableColumnTypes ( const OUString &  sTableName) const

Returns the column types of a table.

It should not be called before calling parseSchema().

Parameters
sTableNamename of the table.
Returns
A vector of column descriptors.

Definition at line 181 of file parseschema.cxx.

References m_ColumnTypes, SAL_WARN, dbtools::throwGenericSQLException(), and u.

◆ getTableIndexes()

const std::map< OUString, std::vector< sal_Int32 > > & dbahsql::SchemaParser::getTableIndexes ( ) const

Returns a vector of indexes for each table.

These indexes are used for locating the data related to the actual table in the binary file.

The indexes point to root elements of AVL trees. Each node of the tree contains one row.

Definition at line 193 of file parseschema.cxx.

References m_Indexes.

◆ parseSchema()

void dbahsql::SchemaParser::parseSchema ( )

Member Data Documentation

◆ m_ColumnTypes

std::map<OUString, std::vector<ColumnDefinition> > dbahsql::SchemaParser::m_ColumnTypes
private

Definition at line 28 of file parseschema.hxx.

Referenced by getTableColumnTypes(), and parseSchema().

◆ m_Indexes

std::map<OUString, std::vector<sal_Int32> > dbahsql::SchemaParser::m_Indexes
private

Definition at line 31 of file parseschema.hxx.

Referenced by getTableIndexes(), and parseSchema().

◆ m_PrimaryKeys

std::map<OUString, std::vector<OUString> > dbahsql::SchemaParser::m_PrimaryKeys
private

Definition at line 34 of file parseschema.hxx.

Referenced by getPrimaryKeys().

◆ m_rStorage

css::uno::Reference<css::embed::XStorage>& dbahsql::SchemaParser::m_rStorage
private

Definition at line 25 of file parseschema.hxx.

Referenced by parseSchema().

◆ m_sAlterStatements

SqlStatementVector dbahsql::SchemaParser::m_sAlterStatements
private

Definition at line 37 of file parseschema.hxx.

Referenced by getAlterStatements(), and parseSchema().

◆ m_sCreateStatements

SqlStatementVector dbahsql::SchemaParser::m_sCreateStatements
private

Definition at line 36 of file parseschema.hxx.

Referenced by getCreateStatements(), and parseSchema().


The documentation for this class was generated from the following files: