view database/sqlite/src/driver.hpp @ 43:fabbe1759cec

Misc: switch to mlk namespace, closes #589
author David Demelier <markand@malikania.fr>
date Tue, 29 Nov 2016 22:25:17 +0100
parents 56ab2f0c90dc
children
line wrap: on
line source

#ifndef MALIKANIA_SQLITE_DRIVER_HPP
#define MALIKANIA_SQLITE_DRIVER_HPP

#include <memory>

#include "sqlite3.h"

namespace sqlite {

using handle = std::unique_ptr<sqlite3, int (*)(sqlite3*)>;
using statement = std::unique_ptr<sqlite3_stmt, int (*)(sqlite3_stmt*)>;

extern handle database;

statement prepare(const std::string& sql);

} // !sqlite

#endif // !MALIKANIA_SQLITE_DRIVER_HPP