[vtk-developers] Re: vtkSQLDatabase
Sebastien BARRE
sebastien.barre at kitware.com
Wed Nov 28 15:58:18 EST 2007
At 11/28/2007 03:50 PM, David C Thompson wrote:
> > ... but I also second Andy's opinion, be careful about wrapping,
> > please do take into account that people will want to use this
> > framework from Tcl, Python, etc, you can't just BTX/ETX.
>OK. How about a class like this:
>
>class vtkSQLDatabaseSchema : public vtkObject
>{
>public:
> virtual int AddTable( const char* tableName );
> virtual int AddColumnToTable( const char* tableName,
> const char* colName, int colType, int colSize,
> const char* colAttribs );
> virtual int AddIndexToTable( const char* tableName,
> const char* iName, int iType,
> const char* foreignTableName=0, const char* foreignIndexName=0 );
> virtual int AddColumnToIndex( const char* tableName,
> const char* iName, const char* colName );
> virtual int AddTriggerToTable( const char* tableName,
> const char* tName, int tType, const char* tAction );
> // ... and similar Get{Column,Index,Trigger} calls.
>};
>That could be wrapped and is a single class instead of one for Tables,
>one for Columns, etc. Some extra macros in C++ (like those in my first
>e-mail) would make it possible to declare a schema in a concise way.
Sounds good to me!
(besides the optional args / default values, which I don't think will wrap).
More information about the vtk-developers
mailing list