00001
00002
00003
00004
00005
00006 #ifndef dsSQLAccessor_h
00007 #define dsSQLAccessor_h
00008
00009 #ifdef HAVE_CONFIG_H
00010 # include <config.h>
00011 #endif
00012
00013 #include <limits.h>
00014 #include <stdlib.h>
00015
00016 #ifdef HAVE_UNISTD_H
00017 # include <unistd.h>
00018 #endif
00019
00020 #include <dsSmartException.h>
00021
00022 DECLARE_EXCEPTION(dsSQL);
00023
00024 #define MAX_COLUMN_NAME 256
00025 #define COMMIT_ON_SUCCESS 1
00026 #define NO_FLAGS 0
00027
00028
00035 class dsSQLAccessor
00036 {
00037 protected:
00041 virtual void Connect(const char * database, const char *username,const char *password, const int flags) = 0;
00045 virtual void Cleanup() = 0;
00046
00050 virtual void Execute(void *stmtp, int PrefetchRows, int CommitOnSuccess) = 0;
00051 };
00052
00057 dsSQLAccessor *dsSQLConnect(const char *url);
00058
00059
00060 #endif