/sqlite3cc

To get this branch, use:
bzr branch http://bzr.ed.am/sqlite3cc

« back to all changes in this revision

Viewing changes to include/sqlitepp/database.hpp

  • Committer: edam
  • Date: 2009-11-25 20:32:34 UTC
  • Revision ID: edam@waxworlds.org-20091125203234-24i7mzd60c7o46py
- initial commit
- basic support for: database, statements, commands, transactions, exceptions
- initial test app
- initial liscence and readme

Show diffs side-by-side

added added

removed removed

1
1
/*
2
 
 * database.h
 
2
 * database.hpp
3
3
 *
4
4
 * Copyright (C) 2009 Tim Marston <edam@waxworlds.org>
5
5
 *
6
 
 * This file is part of sqlite3cc (hereafter referred to as "this program").
7
 
 * See http://www.waxworlds.org/edam/software/sqlite3cc for more information.
 
6
 * This file is part of sqlitepp (hereafter referred to as "this program").
 
7
 * See http://www.waxworlds.org/edam/software/sqlitepp for more information.
8
8
 *
9
9
 * This program is free software: you can redistribute it and/or modify
10
10
 * it under the terms of the GNU Lesser General Public License as published
20
20
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
21
 */
22
22
 
23
 
#ifndef SQLITE3CC_DATABASE_H_
24
 
#define SQLITE3CC_DATABASE_H_
 
23
#ifndef DATABASE_HPP_
 
24
#define DATABASE_HPP_
25
25
 
26
26
 
27
27
#include <sqlite3.h>
32
32
{
33
33
 
34
34
 
35
 
class basic_statement;
 
35
class statement;
36
36
class transaction;
37
37
 
38
38
 
49
49
         * @param filename the filename of the database file to open
50
50
         * @throws database_error on error
51
51
         */
52
 
        explicit database(
 
52
        database(
53
53
                const std::string &filename );
54
54
 
55
 
        explicit database();
 
55
        database();
56
56
        virtual ~database() throw( );
57
57
 
58
58
//______________________________________________________________________________
100
100
//                                                                implementation
101
101
private:
102
102
 
103
 
        friend class basic_statement;
104
 
        friend class command;
 
103
        friend class statement;
105
104
        friend class transaction;
106
105
 
107
106
        /** the database handle */
110
109
};
111
110
 
112
111
 
113
 
} // namespace sqlite
114
 
 
115
 
 
116
 
#endif /* SQLITE3CC_DATABASE_H_ */
 
112
}
 
113
 
 
114
 
 
115
#endif /* DATABASE_HPP_ */