#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include <unistd.h>
#include <libdrizzle/drizzle_server.h>
#include <sqlite3.h>
Go to the source code of this file.
Data Structures | |
struct | sqlite_server |
Defines | |
#define | SQLITE_SERVER_VERSION "SQLite Server using libdrizzle 0.1" |
#define | DRIZZLE_RETURN_CHECK(__ret, __function, __drizzle) |
#define | DRIZZLE_RETURN_ERROR(__function, __drizzle) |
#define | DRIZZLE_RETURN_CHECK_VAL(__ret, __function, __drizzle) |
Functions | |
static void | server_run (sqlite_server *server) |
static int | row_cb (void *data, int field_count, char **fields, char **columns) |
static drizzle_return_t | send_version (sqlite_server *server) |
static void | usage (char *name) |
int | main (int argc, char *argv[]) |
#define SQLITE_SERVER_VERSION "SQLite Server using libdrizzle 0.1" |
Definition at line 21 of file sqlite_server.c.
#define DRIZZLE_RETURN_CHECK | ( | __ret, | |
__function, | |||
__drizzle | |||
) |
{ \ if ((__ret) != DRIZZLE_RETURN_OK) \ DRIZZLE_RETURN_ERROR(__function, __drizzle) \ }
Definition at line 23 of file sqlite_server.c.
#define DRIZZLE_RETURN_ERROR | ( | __function, | |
__drizzle | |||
) |
{ \ printf(__function ":%s\n", drizzle_error(__drizzle)); \ return; \ }
Definition at line 29 of file sqlite_server.c.
#define DRIZZLE_RETURN_CHECK_VAL | ( | __ret, | |
__function, | |||
__drizzle | |||
) |
{ \ if ((__ret) != DRIZZLE_RETURN_OK) \ { \ printf(__function ":%s\n", drizzle_error(__drizzle)); \ return ret; \ } \ }
Definition at line 35 of file sqlite_server.c.
static void server_run | ( | sqlite_server * | server | ) | [static] |
Definition at line 174 of file sqlite_server.c.
static int row_cb | ( | void * | data, |
int | field_count, | ||
char ** | fields, | ||
char ** | columns | ||
) | [static] |
Definition at line 306 of file sqlite_server.c.
static drizzle_return_t send_version | ( | sqlite_server * | server | ) | [static] |
Definition at line 381 of file sqlite_server.c.
static void usage | ( | char * | name | ) | [static] |
Definition at line 436 of file sqlite_server.c.
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 61 of file sqlite_server.c.