15 #ifndef vtkQtSQLDatabase_h
16 #define vtkQtSQLDatabase_h
18 #include "vtkGUISupportQtSQLModule.h"
21 #include <QtSql/QSqlDatabase>
23 VTK_ABI_NAMESPACE_BEGIN
39 bool Open(
const char* password)
override;
100 vtkSetStringMacro(DatabaseType);
107 vtkSetStringMacro(HostName);
108 vtkGetStringMacro(HostName);
115 vtkSetStringMacro(UserName);
116 vtkGetStringMacro(UserName);
123 vtkSetStringMacro(DatabaseName);
124 vtkGetStringMacro(DatabaseName);
131 vtkSetStringMacro(ConnectOptions);
132 vtkGetStringMacro(ConnectOptions);
139 vtkSetClampMacro(DbPort,
int, 0, 65535);
140 vtkGetMacro(DbPort,
int);
194 VTK_ABI_NAMESPACE_END
a simple class to control print indentation
maintains a connection to an sql database
vtkStringArray * GetTables() override
Get the list of tables from the database.
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
bool Open(const char *password) override
Open a new connection to the database.
bool IsOpen() override
Return whether the database has an open connection.
static vtkSQLDatabase * CreateFromURL(const char *URL)
Create a the proper subclass given a URL.
const char * GetDatabaseType() override
String representing Qt database type (e.g.
vtkStdString GetURL() override
Get the URL of the database.
bool HasError() override
Did the last operation generate an error.
const char * GetLastErrorText() override
Get the last error text from the database.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkQtSQLDatabase * New()
bool IsSupported(int feature) override
Return whether a feature is supported by the database.
void SetColumnsTable(const char *table)
Set the table used by GetColumns() Note that this is mainly for use with the VTK parallel server.
vtkStringArray * GetColumns()
Returns a list of columns for a particular table.
~vtkQtSQLDatabase() override
bool ParseURL(const char *url) override
Overridden to determine connection parameters given the URL.
void Close() override
Close the connection to the database.
query class associated with vtkQtSQLDatabase
friend class vtkQtSQLDatabase
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