28 #ifndef vtkQtSQLDatabase_h 29 #define vtkQtSQLDatabase_h 33 #if (QT_EDITION & QT_MODULE_SQL) 35 #include "vtkGUISupportQtSQLModule.h" 38 #include <QtSql/QSqlDatabase> 55 bool Open(
const char* password) VTK_OVERRIDE;
60 void Close() VTK_OVERRIDE;
65 bool IsOpen() VTK_OVERRIDE;
94 void SetColumnsTable(const
char* table);
99 bool IsSupported(
int feature) VTK_OVERRIDE;
104 bool HasError() VTK_OVERRIDE;
109 const
char* GetLastErrorText() VTK_OVERRIDE;
115 const
char* GetDatabaseType() VTK_OVERRIDE
117 return this->DatabaseType;
119 vtkSetStringMacro(DatabaseType);
126 vtkSetStringMacro(HostName);
134 vtkSetStringMacro(UserName);
142 vtkSetStringMacro(DatabaseName);
150 vtkSetStringMacro(ConnectOptions);
158 vtkSetClampMacro(Port,
int, 0, 65535);
159 vtkGetMacro(Port,
int);
183 char* ConnectOptions;
185 QSqlDatabase QtDatabase;
194 bool ParseURL(const
char*
url) VTK_OVERRIDE;
213 #endif // (QT_EDITION & QT_MODULE_SQL) 214 #endif // vtkQtSQLDatabase_h Wrapper around std::string to keep symbols short.
virtual bool Open(const char *password)=0
Open a new connection to the database.
a vtkAbstractArray subclass for strings
virtual vtkStdString GetURL()=0
Get the URL of the database.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
maintain a connection to an sql database
query class associated with vtkQtSQLDatabase
virtual void Close()=0
Close the connection to the database.
a simple class to control print indentation
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
static VTK_NEWINSTANCE vtkSQLDatabase * CreateFromURL(const char *URL)
Create a the proper subclass given a URL.
executes an sql query and retrieves results
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on...
maintains a connection to an sql database