hamsterdb Embedded Database  2.1.7
Macros | Functions
db3.c File Reference
#include <stdio.h>
#include <string.h>
#include <ham/hamsterdb.h>

Go to the source code of this file.

Macros

#define DATABASE_NAME   1
 

Functions

static int my_string_compare (ham_db_t *db, const ham_u8_t *lhs, ham_u32_t lhs_length, const ham_u8_t *rhs, ham_u32_t rhs_length)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define DATABASE_NAME   1

This sample uses hamsterdb to sort data from stdin. Every word is inserted into the database (duplicate words are ignored). Then a cursor is used to print all words in sorted order.

Definition at line 26 of file db3.c.

Referenced by main().

Function Documentation

int main ( int  argc,
char **  argv 
)
static int my_string_compare ( ham_db_t db,
const ham_u8_t lhs,
ham_u32_t  lhs_length,
const ham_u8_t rhs,
ham_u32_t  rhs_length 
)
static

Definition at line 29 of file db3.c.

Referenced by main().