75#ifndef vtkODBCDatabase_h
76#define vtkODBCDatabase_h
78#include "vtkIOODBCModule.h"
101 bool Open(
const char* password);
144 vtkSetStringMacro(DataSourceName);
149 vtkSetStringMacro(HostName);
150 vtkSetStringMacro(UserName);
151 vtkSetStringMacro(DatabaseName);
153 vtkSetStringMacro(Password);
209 vtkSetStringMacro(LastErrorText);
220 char *DataSourceName;
228 vtkSetStringMacro(DatabaseType);
a simple class to control print indentation
maintain an ODBC connection to a SQL database
bool ParseURL(const char *url)
This will only handle URLs of the form odbc://[user@]datsourcename[:port]/[dbname].
bool DropDatabase(const char *dbName)
Drop a database if it exists.
bool IsOpen()
Return whether the database has an open connection.
bool Open(const char *password)
Open a new connection to the database.
vtkStringArray * GetRecord(const char *table)
Get the list of fields for a particular table.
vtkStringArray * GetTables()
Get the list of tables from the database.
void Close()
Close the connection to the database.
bool IsSupported(int feature)
Return whether a feature is supported by the database.
vtkSQLQuery * GetQueryInstance()
Return an empty query on this database.
bool CreateDatabase(const char *dbName, bool dropExisting)
Create a new database, optionally dropping any existing database of the same name.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
bool HasError()
Did the last operation generate an error.
virtual vtkStdString GetIndexSpecification(vtkSQLDatabaseSchema *schema, int tblHandle, int idxHandle, bool &skipped)
Return the SQL string with the syntax to create an index inside a "CREATE TABLE" SQL statement.
const char * GetLastErrorText()
Get the last error text from the database.
vtkStdString GetURL()
Get the URL of the database.
virtual vtkStdString GetColumnSpecification(vtkSQLDatabaseSchema *schema, int tblHandle, int colHandle)
Return the SQL string with the syntax to create a column inside a "CREATE TABLE" SQL statement.
static vtkODBCDatabase * New()
Simple class to hide ODBC structures.
vtkSQLQuery implementation for ODBC connections to databases
friend class vtkODBCDatabase
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
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.