Go to the documentation of this file.
39 #ifndef vtkMySQLDatabase_h
40 #define vtkMySQLDatabase_h
42 #include "vtkIOMySQLModule.h"
65 bool Open(
const char* password = 0 );
118 vtkSetStringMacro(HostName);
126 vtkSetStringMacro(User);
134 vtkSetStringMacro(Password);
141 vtkSetStringMacro(DatabaseName);
152 vtkGetMacro(Reconnect,
int);
161 vtkGetMacro(ServerPort,
int);
233 vtkSetStringMacro(DatabaseType);
252 #endif // vtkMySQLDatabase_h
void Close()
Close the connection to the database.
virtual vtkStdString GetURL()
Get the URL of the database.
bool IsOpen()
Return whether the database has an open connection.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
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.
virtual vtkStdString GetTablePreamble(bool b)
Return the SQL string with the syntax of the preamble following a "CREATE TABLE" SQL statement.
bool IsSupported(int feature)
Return whether a feature is supported by the database.
bool Open(const char *password=0)
Open a new connection to the database.
const char * GetLastErrorText()
Get the last error text from the database.
maintain a connection to a MySQL database
bool HasError()
Did the last operation generate an error.
vtkStringArray * GetRecord(const char *table)
Get the list of fields for a particular table.
static vtkMySQLDatabase * New()
a simple class to control print indentation
bool CreateDatabase(const char *dbName, bool dropExisting)
Create a new database, optionally dropping any existing database of the same name.
vtkSQLQuery implementation for MySQL databases
vtkStringArray * GetTables()
Get the list of tables from the database.
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
bool DropDatabase(const char *dbName)
Drop a database if it exists.
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
virtual bool ParseURL(const char *url)
Overridden to determine connection parameters given the URL.
represent an SQL database schema
a vtkAbstractArray subclass for strings
Wrapper around std::string to keep symbols short.
friend class vtkMySQLDatabase
executes an sql query and retrieves results
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.
maintain a connection to an sql database
vtkSQLQuery * GetQueryInstance()
Return an empty query on this database.