31 #ifndef vtkQtSQLDatabase_h 32 #define vtkQtSQLDatabase_h 36 #if (QT_EDITION & QT_MODULE_SQL) 38 #include "vtkGUISupportQtSQLModule.h" 41 #include <QtSql/QSqlDatabase> 58 bool Open(
const char* password) VTK_OVERRIDE;
63 void Close() VTK_OVERRIDE;
68 bool IsOpen() VTK_OVERRIDE;
97 void SetColumnsTable(const
char* table);
102 bool IsSupported(
int feature) VTK_OVERRIDE;
107 bool HasError() VTK_OVERRIDE;
112 const
char* GetLastErrorText() VTK_OVERRIDE;
118 const
char* GetDatabaseType() VTK_OVERRIDE
120 return this->DatabaseType;
122 vtkSetStringMacro(DatabaseType);
129 vtkSetStringMacro(HostName);
137 vtkSetStringMacro(UserName);
145 vtkSetStringMacro(DatabaseName);
153 vtkSetStringMacro(ConnectOptions);
161 vtkSetClampMacro(Port,
int, 0, 65535);
162 vtkGetMacro(Port,
int);
186 char* ConnectOptions;
188 QSqlDatabase QtDatabase;
197 bool ParseURL(const
char*
url) VTK_OVERRIDE;
212 vtkQtSQLDatabase(const vtkQtSQLDatabase &) VTK_DELETE_FUNCTION;
213 void operator=(const vtkQtSQLDatabase &) VTK_DELETE_FUNCTION;
216 #endif // (QT_EDITION & QT_MODULE_SQL) 217 #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