struct CCL::Database::IConnection
Overview
Database connection interface. More…
#include <idatabase.h> struct IConnection: public CCL::IUnknown { // methods virtual IStatement*CCL_API createStatement (StringRef sql) = 0; virtual IStatement*CCL_API createStatement (const char* sqlUTF8) = 0; virtual tbool CCL_API execute (StringRef sql) = 0; virtual tbool CCL_API execute (const char* sqlUTF8) = 0; virtual tbool CCL_API execute (StringRef sql, Variant& result) = 0; virtual tbool CCL_API execute (const char* sqlUTF8, Variant& result) = 0; virtual tbool CCL_API beginTransaction () = 0; virtual tbool CCL_API commitTransaction () = 0; virtual tbool CCL_API hasTable (const char* name) = 0; virtual tbool CCL_API hasColumn (const char* table, const char* column) = 0; virtual tbool CCL_API hasView (const char* name) = 0; virtual tbool CCL_API getLastError (String& message) = 0; };
Inherited Members
public: // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0;
Detailed Documentation
Database connection interface.
Methods
virtual IStatement*CCL_API createStatement (StringRef sql) = 0
Create a statement object from a CCL String.
virtual IStatement*CCL_API createStatement (const char* sqlUTF8) = 0
Create a statement object from an UTF8 string.
virtual tbool CCL_API execute (StringRef sql) = 0
Execute an SQL statement that has no result data.
virtual tbool CCL_API execute (const char* sqlUTF8) = 0
Execute an SQL statement (UTF8) that has no result data.
virtual tbool CCL_API execute (StringRef sql, Variant& result) = 0
Execute an SQL statement with a single result.
virtual tbool CCL_API execute (const char* sqlUTF8, Variant& result) = 0
Execute an SQL statement (UTF8) with a single result.
virtual tbool CCL_API beginTransaction () = 0
Begin a transaction.
virtual tbool CCL_API commitTransaction () = 0
Commit a transaction.
virtual tbool CCL_API hasTable (const char* name) = 0
Check if the database has a table with that name.
virtual tbool CCL_API hasColumn (const char* table, const char* column) = 0
Check if the database has a table with the given column.
virtual tbool CCL_API hasView (const char* name) = 0
Check if the database has a table with that name.
virtual tbool CCL_API getLastError (String& message) = 0
Get description of the last error.
Returns true if there was an error.