48 #ifndef vtkPostgreSQLDatabase_h
49 #define vtkPostgreSQLDatabase_h
63 friend class vtkPostgreSQLQueryPrivate;
74 bool Open(
const char* password = 0 );
98 virtual void SetHostName(
const char* );
104 virtual void SetUser(
const char* );
109 virtual void SetPassword(
const char* );
113 virtual void SetDatabaseName(
const char* );
119 virtual void SetConnectOptions(
const char* );
125 virtual void SetServerPort(
int );
159 bool CreateDatabase(
const char* dbName,
bool dropExisting =
false );
163 bool DropDatabase(
const char* dbName );
193 void UpdateDataTypeMap();
197 void NullTrailingWhitespace(
char* msg );
198 bool OpenInternal(
const char* connectionOptions );
221 #define vtkSetStringPlusMTimeMacro(className,name,timeStamp) \
222 inline void className::Set##name (const char* _arg) \
224 vtkDebugMacro(<< this->GetClassName() << " (" << this << "): setting " << #name " to " << (_arg?_arg:"(null)") ); \
225 if ( this->name == NULL && _arg == NULL) { return;} \
226 if ( this->name && _arg && (!strcmp(this->name,_arg))) { return;} \
227 delete [] this->name; \
230 size_t n = strlen(_arg) + 1; \
231 char *cp1 = new char[n]; \
232 const char *cp2 = (_arg); \
234 do { *cp1++ = *cp2++; } while ( --n ); \
241 this->timeStamp.Modified(); \
263 #endif // vtkPostgreSQLDatabase_h
Wrapper around std::string to keep symbols short.
virtual vtkStdString GetColumnSpecification(vtkSQLDatabaseSchema *schema, int tblHandle, int colHandle)
vtkTimeStamp ConnectionMTime
#define VTKIOPOSTGRESQL_EXPORT
maintain a connection to a PostgreSQL database
virtual bool IsSupported(int vtkNotUsed(feature))
#define vtkGetMacro(name, type)
void PrintSelf(ostream &os, vtkIndent indent)
record modification and/or execution time
virtual bool Open(const char *password)=0
virtual bool ParseURL(const char *url)=0
internal details of a connection to a PostgreSQL database
virtual bool HasError()=0
a vtkAbstractArray subclass for strings
virtual vtkStdString GetURL()=0
represent an SQL database schema
virtual vtkStringArray * GetRecord(const char *table)=0
GLenum GLsizei GLenum GLenum const GLvoid * table
#define vtkSetStringMacro(name)
#define vtkSetStringPlusMTimeMacro(className, name, timeStamp)
#define vtkTypeMacro(thisClass, superclass)
virtual int GetServerPortMaxValue()
virtual int GetServerPortMinValue()
maintain a connection to an sql database
vtkPostgreSQLDatabasePrivate * Connection
a simple class to control print indentation
const char * GetClassName() const
vtkSQLQuery implementation for PostgreSQL databases
virtual vtkSQLQuery * GetQueryInstance()=0
#define vtkGetStringMacro(name)
virtual const char * GetLastErrorText()=0
executes an sql query and retrieves results
virtual vtkStringArray * GetTables()=0
virtual void SetServerPort(int)