Skip to content

Instantly share code, notes, and snippets.

@JerrySievert
Created December 8, 2015 17:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JerrySievert/e20290117c78bab6adeb to your computer and use it in GitHub Desktop.
Save JerrySievert/e20290117c78bab6adeb to your computer and use it in GitHub Desktop.
#ifndef __QUERY_H__
#define __QUERY_H__
#include "emdb.h"
typedef enum WhereType {
and = 0,
or = 1,
equals = 2,
gt = 3,
lt = 4,
gte = 5,
lte = 6,
between = 7,
in = 8
} WhereType;
typedef struct Where {
WhereType type;
unsigned char *key;
unsigned char *value;
unsigned char child_count;
void **children;
} Where;
typedef struct QueryResults {
int count;
unsigned char *keys[];
} QueryResults;
QueryResults *emdb_query_db(EMDB *, Query *);
#endif /* __QUERY_H__ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment