diff options
author | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 05:47:33 +0300 |
---|---|---|
committer | gramanas <anastasis.gramm2@gmail.com> | 2018-04-22 05:47:33 +0300 |
commit | eeca7f0151d85d563d1db229e3b7ca936323ffa2 (patch) | |
tree | 32e57172bd786daed9ac4251b3c5edf09c49d242 /src/dblayer.h | |
parent | 3560d8be4b833e888e8386a3dc641fa164b4b808 (diff) | |
download | ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.gz ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.tar.bz2 ck-eeca7f0151d85d563d1db229e3b7ca936323ffa2.zip |
First steps towards adding to the db
Diffstat (limited to 'src/dblayer.h')
-rw-r--r-- | src/dblayer.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/src/dblayer.h b/src/dblayer.h index 24fdc2b..de73aac 100644 --- a/src/dblayer.h +++ b/src/dblayer.h @@ -33,14 +33,25 @@ struct DBstruct { SqlError error; }; -extern int db_exists(UserOpt *opt); -extern DB open_DB(); +extern int db_exists(const UserOpt *opt); + +/* Open the db file. On fail return null pointer to db + * and the corresponding SQL error (NO_DB_FILE | NO_TABLES)*/ +extern DB open_DB(const UserOpt *opt); + extern void close_DB(DB *DB); +/********/ /* init */ +/********/ + +/* Create the tables required for the ckdb */ extern void init_make_tables(DB *db); -extern DB init_make_DB(); +extern DB init_make_DB(const UserOpt *opt); +/*******/ /* add */ -extern int add_insert_program_to_db(DB *db, char * name); +/*******/ + +extern int add_insert_program_to_db(DB *db, const char * name); #endif /* DBLAEYR_H */ |