/[PAMELA software]/yodaUtility/YSQLConnection.h
ViewVC logotype

Annotation of /yodaUtility/YSQLConnection.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun Apr 30 11:08:14 2006 UTC (18 years, 7 months ago) by kusanagi
Branch point for: MAIN
File MIME type: text/plain
Initial revision

1 kusanagi 1.1 #ifndef YSQL_CONNECTION_H
2     #define YSQL_CONNECTION_H
3    
4     #include <TSQLServer.h>
5     #include <YException.h>
6    
7     using namespace yngn::YException;
8    
9     namespace yngn {
10     namespace sql {
11     /**
12     * Connection to the database.
13     * In the furure it should became a pool of connections
14     */
15     class YSQLConnection {
16     private:
17     /**
18     * The physics event that is created in this algorithm.
19     */
20     static TSQLServer *sqlServer;
21     static YSQLConnection *sqlConnection;
22    
23     YSQLConnection(char*, char*, char*) throw (YSQLNotConnectedException);
24     public:
25     static bool isConnected() { return (sqlServer == NULL); }
26     static TSQLServer* getConnection(char*, char*, char*) throw (YSQLNotConnectedException);
27     //static TSQLServer* getConnection(char*) throw (YSQLNotConnectedException);
28     static TSQLServer* getConnection(void) throw (YSQLNotConnectedException);
29     };
30     }
31     }
32     #endif /* YSQL_CONNECTION_H */

  ViewVC Help
Powered by ViewVC 1.1.23