summaryrefslogtreecommitdiffstats
path: root/krecipes/src/backends/SQLite/qsql_sqlite.h
blob: d173f32e0ee501a53e1db8550d19e3414164df04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/***************************************************************************
*   Copyright (C) 2005 by                                                 *
*   Jason Kivlighn (jkivlighn@gmail.com)                                  *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#ifndef TQSQL_SQLITE_H
#define TQSQL_SQLITE_H

#include <ntqsqldriver.h>
#include <ntqsqlresult.h>
#include <ntqsqlrecord.h>
#include <ntqsqlindex.h>

typedef TQVariant TQSqlVariant;

class TQSQLiteDB;

class KreSQLiteDriver : public TQSqlDriver
{
public:
	KreSQLiteDriver(TQObject * parent = 0, const char * name = 0);	
	KreSQLiteDriver(TQSQLiteDB *connection, TQObject *parent = 0, const char *name = 0);
	~KreSQLiteDriver();

	bool    hasFeature( DriverFeature ) const;
	bool    open( const TQString&,
			const TQString&,
			const TQString&,
			const TQString&,
			int );
	void    close();
	TQSqlQuery createQuery() const;

	bool beginTransaction();
	bool commitTransaction();
	bool rollbackTransaction();
	TQStringList tables(const TQString &typeName) const;
	TQSqlIndex primaryIndex(const TQString &tblname) const;
	//TQSqlRecordInfo recordInfo(const TQString &tbl) const;
	//TQSqlRecord record(const TQString &tblname) const;
	//TQString formatValue( const TQSqlField* field, bool trimStrings ) const;

private:
	friend class KreSQLiteResult;

	TQSQLiteDB *db;
};
#endif