Files
xahaud/db/cursor.h
Vinnie Falco c58450a44b Squashed 'src/sophia/' content from commit 9d29b94
git-subtree-dir: src/sophia
git-subtree-split: 9d29b94cd66d3bd67082642b9a1f6dea470f0730
2013-09-17 10:09:27 -07:00

48 lines
747 B
C

#ifndef SP_CURSOR_H_
#define SP_CURSOR_H_
/*
* sophia database
* sphia.org
*
* Copyright (c) Dmitry Simonenko
* BSD License
*/
typedef struct spc spc;
enum spcsrc {
SPCNONE,
SPCI0,
SPCI1,
SPCP
};
#define SPCVDUP 1
#define SPCPDUP 2
typedef enum spcsrc spcsrc;
struct spc {
spmagic m;
sporder o;
sp *s;
spii i0, i1;
int dup; /* last iteration duplicate flags */
sppageh *ph;
sppage *p;
int pi; /* page space index */
spvh *pv;
int pvi; /* version page index */
spcsrc vsrc; /* last iteration source */
spref r; /* last iteration result */
};
void sp_cursoropen(spc*, sp*, sporder, char*, int);
void sp_cursorclose(spc*);
int sp_iterate(spc*);
int sp_match(sp*, void*, size_t, void**, size_t*);
#endif