72#ifndef vtkODBCDatabase_h
73#define vtkODBCDatabase_h
75#include "vtkIOODBCModule.h"
98 bool Open(
const char* password)
override;
141 vtkSetStringMacro(DataSourceName);
142 vtkGetStringMacro(DataSourceName);
145 vtkSetMacro(ServerPort,
int);
146 vtkSetStringMacro(HostName);
147 vtkSetStringMacro(UserName);
148 vtkSetStringMacro(DatabaseName);
149 vtkGetStringMacro(DatabaseName);
150 vtkSetStringMacro(Password);
203 vtkSetStringMacro(LastErrorText);
214 char* DataSourceName;
222 vtkSetStringMacro(DatabaseType);
a simple class to control print indentation
maintain an ODBC connection to a SQL 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.
bool DropDatabase(const char *dbName)
Drop a database if it exists.
const char * GetLastErrorText() override
Get the last error text from the database.
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
vtkStringArray * GetTables() override
Get the list of tables from the database.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
bool HasError() override
Did the last operation generate an error.
vtkStdString GetURL() override
Get the URL of the database.
bool Open(const char *password) override
Open a new connection to the database.
const char * GetDatabaseType() override
String representing database type (e.g.
bool CreateDatabase(const char *dbName, bool dropExisting)
Create a new database, optionally dropping any existing database of the same name.
~vtkODBCDatabase() override
bool IsSupported(int feature) override
Return whether a feature is supported by the database.
bool ParseURL(const char *url) override
This will only handle URLs of the form odbc://[user@]datsourcename[:port]/[dbname].
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void Close() override
Close the connection to the database.
bool IsOpen() override
Return whether the database has an open connection.
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.
static vtkODBCDatabase * New()
Simple class to hide ODBC structures.
vtkSQLQuery implementation for ODBC connections to databases
represent an SQL database schema
maintain a connection to an sql database
executes an sql query and retrieves results
Wrapper around std::string to keep symbols short.
a vtkAbstractArray subclass for strings