upscaledb  2.2.1
Macros | Functions
uqi2.c File Reference
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <stdlib.h>
#include <ups/upscaledb.h>
#include <ups/upscaledb_uqi.h>

Go to the source code of this file.

Macros

#define DATABASE_NAME   1
 

Functions

void error (const char *foo, ups_status_t st)
 
static void * mycount_init (int flags, int key_type, uint32_t key_size, int record_type, uint32_t record_size, const char *reserved)
 
static void mycount_cleanup (void *state)
 
static void mycount_single (void *state, const void *key_data, uint32_t key_size, const void *record_data, uint32_t record_size)
 
static void mycount_many (void *state, const void *key_data_list, const void *record_data_list, size_t list_length)
 
static void mycount_results (void *state, uqi_result_t *result)
 
static int equals10_predicate (void *state, const void *key_data, uint32_t key_size, const void *record_data, uint32_t record_size)
 
int main (int argc, char **argv)
 

Macro Definition Documentation

#define DATABASE_NAME   1

This example demonstrates a more complex UQI queries which applies a user-supplied predicate function to filter data

Definition at line 31 of file uqi2.c.

Referenced by main().

Function Documentation

static int equals10_predicate ( void *  state,
const void *  key_data,
uint32_t  key_size,
const void *  record_data,
uint32_t  record_size 
)
static

Definition at line 102 of file uqi2.c.

Referenced by main().

void error ( const char *  foo,
ups_status_t  st 
)

Definition at line 34 of file uqi2.c.

References ups_strerror().

Referenced by main().

int main ( int  argc,
char **  argv 
)
static void mycount_cleanup ( void *  state)
static

Definition at line 58 of file uqi2.c.

Referenced by main().

static void* mycount_init ( int  flags,
int  key_type,
uint32_t  key_size,
int  record_type,
uint32_t  record_size,
const char *  reserved 
)
static

Definition at line 45 of file uqi2.c.

Referenced by main().

static void mycount_many ( void *  state,
const void *  key_data_list,
const void *  record_data_list,
size_t  list_length 
)
static

Definition at line 81 of file uqi2.c.

Referenced by main().

static void mycount_results ( void *  state,
uqi_result_t result 
)
static

Definition at line 92 of file uqi2.c.

References uqi_result_add_row().

Referenced by main().

static void mycount_single ( void *  state,
const void *  key_data,
uint32_t  key_size,
const void *  record_data,
uint32_t  record_size 
)
static

Definition at line 68 of file uqi2.c.

Referenced by main().