trying to implement list_tables

This commit is contained in:
Max Lapshin
2009-10-13 09:00:25 +04:00
parent 690974d808
commit 9a3aea50a7
2 changed files with 25 additions and 20 deletions

View File

@@ -65,22 +65,24 @@ static void outputv(ErlDrvData handle, ErlIOVec *ev) {
ErlDrvBinary* data = ev->binv[1];
int command = data->orig_bytes[0]; // First byte is the command
// switch(command) {
// case CMD_PUT:
// put(driver_data, ev);
// break;
//
// case CMD_GET:
// get(driver_data, ev);
// break;
//
// case CMD_DEL:
// del(driver_data, ev);
// break;
//
// default:
// unkown(driver_data, ev);
// }
fprintf(stderr, "Command: %s\n", data->orig_bytes);
switch(command) {
case CMD_LIST_TABLES:
list_tables(driver_data, ev);
break;
// case CMD_GET:
// get(driver_data, ev);
// break;
//
// case CMD_DEL:
// del(driver_data, ev);
// break;
default:
unkown(driver_data, ev);
}
}
static void ready_async(ErlDrvData drv_data, ErlDrvThreadData thread_data)
@@ -88,6 +90,9 @@ static void ready_async(ErlDrvData drv_data, ErlDrvThreadData thread_data)
}
static void list_tables(sqlite3_drv_t *drv, ErlIOVec *ev) {
}
#if 0
// Insert or replace record in the database
static void put(sqlite3_drv_t *bdb_drv, ErlIOVec *ev) {