39 #ifndef vtkMySQLDatabase_h 40 #define vtkMySQLDatabase_h 42 #include "vtkIOMySQLModule.h" 65 bool Open(
const char* password = 0 )
override;
70 void Close()
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;
214 bool CreateDatabase(
const char* dbName,
bool dropExisting );
220 bool DropDatabase(
const char* dbName );
236 vtkSetStringMacro(DatabaseType);
255 #endif // vtkMySQLDatabase_h Wrapper around std::string to keep symbols short.
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...
virtual bool IsSupported(int vtkNotUsed(feature))
Return whether a feature is supported by the database.
virtual bool Open(const char *password)=0
Open a new connection to the database.
virtual bool ParseURL(const char *url)=0
Subclasses should override this method to determine connection parameters given the URL...
virtual bool HasError()=0
Did the last operation generate an error.
a vtkAbstractArray subclass for strings
virtual vtkStdString GetURL()=0
Get the URL of the database.
represent an SQL database schema
virtual vtkStringArray * GetRecord(const char *table)=0
Get the list of fields for a particular table.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
maintain a connection to a MySQL database
maintain a connection to an sql database
friend class vtkMySQLDatabase
virtual void Close()=0
Close the connection to the database.
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...
a simple class to control print indentation
virtual vtkSQLQuery * GetQueryInstance()=0
Return an empty query on this database.
virtual bool IsOpen()=0
Return whether the database has an open connection.
virtual const char * GetLastErrorText()=0
Get the last error text from the database I'm using const so that people do NOT use the standard vtkG...
vtkStdString GetTablePreamble(bool b) override
Return the SQL string with the syntax of the preamble following a "CREATE TABLE" SQL statement...
executes an sql query and retrieves results
const char * GetDatabaseType() override
String representing database type (e.g.
vtkSQLQuery implementation for MySQL databases
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
virtual vtkStringArray * GetTables()=0
Get the list of tables from the database.