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

#include <hsqlimport.hxx>

Public Member Functions

 HsqlImporter (css::uno::Reference< css::sdbc::XConnection > &rConnection, const css::uno::Reference< css::embed::XStorage > &rStorage)
 
void importHsqlDatabase (weld::Window *pParent)
 Migrate a HSQL database to another. More...
 

Protected Member Functions

void insertRow (const std::vector< css::uno::Any > &xRows, std::u16string_view sTable, const std::vector< ColumnDefinition > &rColTypes)
 
void processTree (HsqlBinaryNode &rNode, HsqlRowInputStream &rStream, const std::vector< ColumnDefinition > &rColTypes, const OUString &sTableName, sal_Int32 nIndexCount)
 
void parseTableRows (const std::vector< sal_Int32 > &rIndexes, const std::vector< ColumnDefinition > &rColTypes, const OUString &sTableName)
 Format from the indexed file position is the following: <Node x20><Row> Where Node is a 20 byte data, representing the rows in a binary tree: <Size x4><Balance x4><Left x4> <Right x4><Parent x4> More...
 

Private Attributes

css::uno::Reference< css::sdbc::XConnection > & m_rConnection
 
css::uno::Reference< css::embed::XStorage > m_xStorage
 

Detailed Description

Definition at line 26 of file hsqlimport.hxx.

Constructor & Destructor Documentation

◆ HsqlImporter()

dbahsql::HsqlImporter::HsqlImporter ( css::uno::Reference< css::sdbc::XConnection > &  rConnection,
const css::uno::Reference< css::embed::XStorage > &  rStorage 
)
Parameters
rConnectionreference to an sdbc connection. The migration will perform to this connection.
rStorageStorage where the HSQL database can be found. The schema definition should be in file "script" in form of DDL SQL statements. The data should be found in file "data". These are HSQLDB's own format.

Definition at line 209 of file hsqlimport.cxx.

References m_xStorage.

Member Function Documentation

◆ importHsqlDatabase()

void dbahsql::HsqlImporter::importHsqlDatabase ( weld::Window pParent)

Migrate a HSQL database to another.

Definition at line 290 of file hsqlimport.cxx.

References ex, weld::Window::GetXWindow(), m_rConnection, m_xStorage, parser, parseTableRows(), SAL_WARN, and dbtools::showError().

◆ insertRow()

void dbahsql::HsqlImporter::insertRow ( const std::vector< css::uno::Any > &  xRows,
std::u16string_view  sTable,
const std::vector< ColumnDefinition > &  rColTypes 
)
protected

Definition at line 215 of file hsqlimport.cxx.

References m_rConnection.

Referenced by processTree().

◆ parseTableRows()

void dbahsql::HsqlImporter::parseTableRows ( const std::vector< sal_Int32 > &  rIndexes,
const std::vector< ColumnDefinition > &  rColTypes,
const OUString &  sTableName 
)
protected

Format from the indexed file position is the following: <Node x20><Row> Where Node is a 20 byte data, representing the rows in a binary tree: <Size x4><Balance x4><Left x4> <Right x4><Parent x4>

Size is the size of <Row>; Balance: ? Left/Right/Parent: File position of the Left/Right/Parent child

Definition at line 262 of file hsqlimport.cxx.

References m_xStorage, processTree(), SAL_WARN, dbahsql::HsqlRowInputStream::setInputStream(), u, and xStream.

Referenced by importHsqlDatabase().

◆ processTree()

void dbahsql::HsqlImporter::processTree ( HsqlBinaryNode rNode,
HsqlRowInputStream rStream,
const std::vector< ColumnDefinition > &  rColTypes,
const OUString &  sTableName,
sal_Int32  nIndexCount 
)
protected

Member Data Documentation

◆ m_rConnection

css::uno::Reference<css::sdbc::XConnection>& dbahsql::HsqlImporter::m_rConnection
private

Definition at line 29 of file hsqlimport.hxx.

Referenced by importHsqlDatabase(), and insertRow().

◆ m_xStorage

css::uno::Reference<css::embed::XStorage> dbahsql::HsqlImporter::m_xStorage
private

Definition at line 30 of file hsqlimport.hxx.

Referenced by HsqlImporter(), importHsqlDatabase(), and parseTableRows().


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