Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sptksqldatabase.h

00001 /***************************************************************************
00002 sptksqldatabase.h  -  description
00003 -------------------
00004 begin                : Tue Jan 7 2003
00005 copyright            : (C) 2003 by Sven Broenstrup
00006 email                : starpeak@sptk.org
00007 ***************************************************************************/
00008 
00009 /***************************************************************************
00010 *                                                                         *
00011 *   StarPeak OnlineMedia., hereby disclaims all copyright interest in     *
00012 *   the library `SPTK' written by Sven Broenstrup.                        *
00013 *                                                                         *
00014 *   Permission is hereby granted, free of charge, to any person obtaining *
00015 *   a copy of this software and associated documentation files (the       *
00016 *   "Software"), to deal in the Software without restriction, including   *
00017 *   without limitation the rights to use, copy, modify, merge, publish,   *
00018 *   distribute, sublicense, and/or sell copies of the Software, and to    *
00019 *   permit persons to whom the Software is furnished to do so, subject to *
00020 *   the following conditions:                                             *
00021 *                                                                         *
00022 *   The above copyright notice and this permission notice shall be        *
00023 *   included in all copies or substantial portions of the Software.       *
00024 *                                                                         *
00025 *   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       *
00026 *   EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    *
00027 *   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*
00028 *   IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR     *
00029 *   OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
00030 *   ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
00031 *   OTHER DEALINGS IN THE SOFTWARE.                                       *
00032 *                                                                         *
00033 ***************************************************************************/
00034 
00035 #ifndef SPTKSQLDATABASE_H
00036 #define SPTKSQLDATABASE_H
00037 
00038 #include <string>
00039 #include "../sptkobject.h"
00040 #include "sptksqlresult.h"
00041 
00046 class sptkSQLDatabase : public sptkObject
00047 {
00048 public:
00049     sptkSQLDatabase();
00050     virtual ~sptkSQLDatabase();
00059     virtual int changeUser(std::string user, std::string passwd="", std::string database="");
00060 
00064     virtual void close();
00065 
00078     virtual int connect(std::string server , std::string user , std::string passwd, std::string database="" , int flags=0);
00079 
00086     virtual int createDB(std::string database);
00087 
00092     virtual sptkSQLResult *query(std::string queryString);
00093 
00100     virtual int drop(std::string name);
00101 
00106     virtual std::string error();
00107 
00114     virtual std::string *listDBs(std::string wildcard="");
00115 
00122     virtual std::string *listTables(std::string wildcard="");
00123 
00128     virtual int selectDB(std::string database);
00129 };
00130 
00131 #endif
Powered by SPOM