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 )
override;
113 return this->DatabaseType;
121 vtkSetStringMacro(HostName);
122 vtkGetStringMacro(HostName);
129 vtkSetStringMacro(User);
130 vtkGetStringMacro(User);
137 vtkSetStringMacro(Password);
144 vtkSetStringMacro(DatabaseName);
145 vtkGetStringMacro(DatabaseName);
154 vtkSetMacro(Reconnect,
int);
155 vtkGetMacro(Reconnect,
int);
156 vtkBooleanMacro(Reconnect,
int);
164 vtkGetMacro(ServerPort,
int);
193 int colHandle )
override;
208 bool& skipped )
override;
236 vtkSetStringMacro(DatabaseType);
255 #endif // vtkMySQLDatabase_h
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.
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
bool Open(const char *password=0) override
Open a new connection to the database.
bool IsSupported(int feature) override
Return whether a feature is supported by the database.
const char * GetLastErrorText() override
Get the last error text from the database.
maintain a connection to a MySQL database
bool HasError() override
Did the last operation generate an error.
static vtkMySQLDatabase * New()
a simple class to control print indentation
const char * GetDatabaseType() override
String representing database type (e.g.
bool ParseURL(const char *url) override
Overridden to determine connection parameters given the URL.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
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
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.
bool IsOpen() override
Return whether the database has an open connection.
represent an SQL database schema
vtkStringArray * GetTables() override
Get the list of tables from the database.
void Close() override
Close the connection to the database.
a vtkAbstractArray subclass for strings
vtkStdString GetTablePreamble(bool b) override
Return the SQL string with the syntax of the preamble following a "CREATE TABLE" SQL statement.
Wrapper around std::string to keep symbols short.
friend class vtkMySQLDatabase
vtkStdString GetURL() override
Get the URL of the database.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
executes an sql query and retrieves results
maintain a connection to an sql database