Revert previous commit, was incorrect
[amarok.git] / src / collection / SqlStorage.h
blob499b30d532d0a227ff8fcdb285665856851b5bc2
1 /*
2 Copyright (C) 2007 Maximilian Kossick <maximilian.kossick@googlemail.com>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 #ifndef AMAROK_SQLSTORAGE_H
20 #define AMAROK_SQLSTORAGE_H
22 #include "amarok_export.h"
24 #include <QString>
25 #include <QStringList>
27 class AMAROK_EXPORT SqlStorage
29 public:
30 SqlStorage() {}
31 virtual ~SqlStorage() {}
33 virtual int sqlDatabasePriority() const = 0;
35 virtual QString type() const = 0;
37 virtual QString escape( QString text ) const = 0;
39 virtual QStringList query( const QString &query ) = 0;
40 virtual int insert( const QString &statement, const QString &table ) = 0;
42 virtual QString boolTrue() const = 0;
43 virtual QString boolFalse() const = 0;
45 /**
46 use this type for auto incrementing integer primary keys.
48 virtual QString idType() const = 0;
50 virtual QString textColumnType( int length = 255 ) const = 0;
51 virtual QString exactTextColumnType( int length = 1024 ) const = 0;
52 virtual QString longTextColumnType() const = 0;
53 virtual QString randomFunc() const = 0;
57 #endif