Go to the documentation of this file.
75 #ifndef vtkODBCDatabase_h
76 #define vtkODBCDatabase_h
78 #include "vtkIOODBCModule.h"
101 bool Open(
const char* password)
override;
144 vtkSetStringMacro(DataSourceName);
145 vtkGetStringMacro(DataSourceName);
148 vtkSetMacro(ServerPort,
int);
149 vtkSetStringMacro(HostName);
150 vtkSetStringMacro(UserName);
151 vtkSetStringMacro(DatabaseName);
152 vtkGetStringMacro(DatabaseName);
153 vtkSetStringMacro(Password);
163 return this->DatabaseType;
178 int colHandle )
override;
187 bool& skipped )
override;
212 vtkSetStringMacro(LastErrorText);
223 char *DataSourceName;
231 vtkSetStringMacro(DatabaseType);
239 #endif // vtkODBCDatabase_h
const char * GetLastErrorText() override
Get the last error text from the database.
vtkStdString GetColumnSpecification(vtkSQLDatabaseSchema *schema, int tblHandle, int colHandle) override
Return the SQL string with the syntax to create a column inside a "CREATE TABLE" SQL statement.
vtkSQLQuery implementation for ODBC connections to databases
bool ParseURL(const char *url) override
This will only handle URLs of the form odbc://[user@]datsourcename[:port]/[dbname].
vtkStdString GetIndexSpecification(vtkSQLDatabaseSchema *schema, int tblHandle, int idxHandle, bool &skipped) override
Return the SQL string with the syntax to create an index inside a "CREATE TABLE" SQL statement.
bool DropDatabase(const char *dbName)
Drop a database if it exists.
vtkStringArray * GetTables() override
Get the list of tables from the database.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
Simple class to hide ODBC structures.
bool IsSupported(int feature) override
Return whether a feature is supported by the database.
bool IsOpen() override
Return whether the database has an open connection.
vtkStdString GetURL() override
Get the URL of the database.
maintain an ODBC connection to a SQL database
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
bool CreateDatabase(const char *dbName, bool dropExisting)
Create a new database, optionally dropping any existing database of the same name.
a simple class to control print indentation
static vtkODBCDatabase * New()
void Close() override
Close the connection to the database.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
const char * GetDatabaseType() override
String representing database type (e.g.
friend class vtkODBCDatabase
represent an SQL database schema
a vtkAbstractArray subclass for strings
bool Open(const char *password) override
Open a new connection to the database.
bool HasError() override
Did the last operation generate an error.
Wrapper around std::string to keep symbols short.
executes an sql query and retrieves results
maintain a connection to an sql database