cctools
jx_database.h
Go to the documentation of this file.
1 /*
2 Copyright (C) 2012- The University of Notre Dame
3 This software is distributed under the GNU General Public License.
4 See the file COPYING for details.
5 */
6 
7 #ifndef JX_DATABASE_H
8 #define JX_DATABASE_H
9 
62 #include "jx.h"
63 
69 struct jx_database * jx_database_create( const char *logdir );
70 
78 void jx_database_insert( struct jx_database *db, const char *key, struct jx *j );
79 
86 struct jx * jx_database_lookup( struct jx_database *db, const char *key );
87 
95 struct jx * jx_database_remove( struct jx_database *db, const char *key );
96 
104 void jx_database_firstkey( struct jx_database *db );
105 
114 int jx_database_nextkey( struct jx_database *db, char **key, struct jx **j );
115 
116 #endif
void jx_database_firstkey(struct jx_database *db)
Begin iteration over all keys in the database.
void jx_database_insert(struct jx_database *db, const char *key, struct jx *j)
Insert or update an object into the database.
struct jx * jx_database_lookup(struct jx_database *db, const char *key)
Look up an object in the database.
struct jx * jx_database_remove(struct jx_database *db, const char *key)
Remove an object from the database.
JSON Expressions (JX) library.
int jx_database_nextkey(struct jx_database *db, char **key, struct jx **j)
Continue iteration over the database.
JX value representing any expression type.
Definition: jx.h:113
struct jx_database * jx_database_create(const char *logdir)
Create a new database, recovering state from disk if available.