|  | VTK
    9.0.1
    | 
 
 
 
Go to the documentation of this file.
   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) 
override;
 
   60   void Close() 
override;
 
   94   void SetColumnsTable(
const char* table);
 
  116   vtkSetStringMacro(DatabaseType);
 
  123   vtkSetStringMacro(HostName);
 
  124   vtkGetStringMacro(HostName);
 
  131   vtkSetStringMacro(UserName);
 
  132   vtkGetStringMacro(UserName);
 
  139   vtkSetStringMacro(DatabaseName);
 
  140   vtkGetStringMacro(DatabaseName);
 
  147   vtkSetStringMacro(ConnectOptions);
 
  148   vtkGetStringMacro(ConnectOptions);
 
  155   vtkSetClampMacro(Port, 
int, 0, 65535);
 
  156   vtkGetMacro(Port, 
int);
 
  180   char* ConnectOptions;
 
  182   QSqlDatabase QtDatabase;
 
  210 #endif // (QT_EDITION & QT_MODULE_SQL) 
  211 #endif // vtkQtSQLDatabase_h 
  
virtual vtkStringArray * GetRecord(const char *table)=0
Get the list of fields for a particular table.
virtual bool IsSupported(int vtkNotUsed(feature))
Return whether a feature is supported by the database.
virtual void Close()=0
Close the connection to the database.
virtual bool HasError()=0
Did the last operation generate an error.
static vtkSQLDatabase * CreateFromURL(const char *URL)
Create a the proper subclass given a URL.
static vtkObject * New()
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
query class associated with vtkQtSQLDatabase
virtual vtkSQLQuery * GetQueryInstance()=0
Return an empty query on this database.
virtual bool IsOpen()=0
Return whether the database has an open connection.
virtual bool Open(const char *password)=0
Open a new connection to the database.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
a simple class to control print indentation
virtual vtkStringArray * GetTables()=0
Get the list of tables from the database.
virtual vtkStdString GetURL()=0
Get the URL of the database.
a vtkAbstractArray subclass for strings
virtual bool ParseURL(const char *url)=0
Subclasses should override this method to determine connection parameters given the URL.
Wrapper around std::string to keep symbols short.
virtual const char * GetLastErrorText()=0
Get the last error text from the database I'm using const so that people do NOT use the standard vtkG...
maintains a connection to an sql database
executes an sql query and retrieves results
virtual const char * GetDatabaseType()=0
Get the type of the database (e.g.
maintain a connection to an sql database