 |
VTK
9.1.0
|
Go to the documentation of this file.
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);
215 #endif // vtkQtSQLDatabase_h
static vtkQtSQLDatabase * New()
const char * GetDatabaseType() override
String representing Qt database type (e.g.
vtkStringArray * GetTables() override
Get the list of tables from the database.
query class associated with vtkQtSQLDatabase
#define VTK_DEPRECATED_IN_9_1_0(reason)
~vtkQtSQLDatabase() override
bool Open(const char *password) override
Open a new connection to the database.
vtkStringArray * GetRecord(const char *table) override
Get the list of fields for a particular table.
static vtkSQLDatabase * CreateFromURL(const char *URL)
Create a the proper subclass given a URL.
vtkSQLQuery * GetQueryInstance() override
Return an empty query on this database.
a simple class to control print indentation
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.
vtkStdString GetURL() override
Get the URL of the database.
void Close() override
Close the connection to the database.
friend class vtkQtSQLDatabase
bool IsOpen() override
Return whether the database has an open connection.
a vtkAbstractArray subclass for strings
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Wrapper around std::string to keep symbols short.
bool HasError() override
Did the last operation generate an error.
maintains a connection to an sql database
executes an sql query and retrieves results
vtkStringArray * GetColumns()
Returns a list of columns for a particular table.
bool ParseURL(const char *url) override
Overridden to determine connection parameters given the URL.
bool IsSupported(int feature) override
Return whether a feature is supported by the database.
maintain a connection to an sql database