28#ifndef vtkQtSQLDatabase_h
29#define vtkQtSQLDatabase_h
32#include "vtkGUISupportQtSQLModule.h"
35#include <QtSql/QSqlDatabase>
52 bool Open(
const char* password)
override;
113 vtkSetStringMacro(DatabaseType);
120 vtkSetStringMacro(HostName);
121 vtkGetStringMacro(HostName);
128 vtkSetStringMacro(UserName);
129 vtkGetStringMacro(UserName);
136 vtkSetStringMacro(DatabaseName);
137 vtkGetStringMacro(DatabaseName);
144 vtkSetStringMacro(ConnectOptions);
145 vtkGetStringMacro(ConnectOptions);
153 int GetPort() {
return this->GetDbPort(); }
160 vtkSetClampMacro(DbPort,
int, 0, 65535);
161 vtkGetMacro(DbPort,
int);
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.
const char * GetDatabaseType() override
String representing Qt database type (e.g.
bool Open(const char *password) override
Open a new connection to the database.
bool IsOpen() override
Return whether the database has an open connection.
vtkStringArray * GetColumns()
Returns a list of columns for a particular table.
vtkStdString GetURL() override
Get the URL of the database.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
bool HasError() override
Did the last operation generate an error.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkSQLDatabase * CreateFromURL(const char *URL)
Create a the proper subclass given a URL.
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.
const char * GetLastErrorText() override
Get the last error text from the database.
~vtkQtSQLDatabase() override
bool ParseURL(const char *url) override
Overridden to determine connection parameters given the URL.
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
static vtkQtSQLDatabase * New()
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
#define VTK_DEPRECATED_IN_9_1_0(reason)