23#ifndef vtkMySQLDatabase_h
24#define vtkMySQLDatabase_h
26#include "vtkIOMySQLModule.h"
29VTK_ABI_NAMESPACE_BEGIN
50 bool Open(
const char* password =
nullptr)
override;
103 vtkSetStringMacro(HostName);
104 vtkGetStringMacro(HostName);
111 vtkSetStringMacro(User);
112 vtkGetStringMacro(User);
119 vtkSetStringMacro(Password);
126 vtkSetStringMacro(DatabaseName);
127 vtkGetStringMacro(DatabaseName);
136 vtkSetMacro(Reconnect,
int);
137 vtkGetMacro(Reconnect,
int);
138 vtkBooleanMacro(Reconnect,
int);
146 vtkGetMacro(ServerPort,
int);
215 vtkSetStringMacro(DatabaseType);
a simple class to control print indentation
maintain a connection to a MySQL database
const char * GetLastErrorText() override
Get the last error text from the database.
static vtkMySQLDatabase * New()
bool IsOpen() override
Return whether the database has an open connection.
bool DropDatabase(const char *dbName)
Drop a database if it exists.
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 CreateDatabase(const char *dbName, bool dropExisting)
Create a new database, optionally dropping any existing database of the same name.
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.
bool HasError() override
Did the last operation generate an error.
const char * GetDatabaseType() override
String representing database type (e.g.
bool Open(const char *password=nullptr) override
Open a new connection to the database.
vtkStdString GetTablePreamble(bool b) override
Return the SQL string with the syntax of the preamble following a "CREATE TABLE" SQL statement.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
bool IsSupported(int feature) override
Return whether a feature is supported by the 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.
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 ParseURL(const char *url) override
Overridden to determine connection parameters given the URL.
~vtkMySQLDatabase() override
vtkStdString GetURL() override
Get the URL of the database.
vtkSQLQuery implementation for MySQL 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