sqlfun/exec.c
Jeff Garzik af321368f2 Begin replacing emit() placeholders with API function calls
CREATE DATABASE, DROP DATABASE, DROP TABLE, sql statement, and list
of table names all have associated API calls.

Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
2009-11-08 18:57:33 -05:00

32 lines
547 B
C

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "sql-parser.h"
void sqlp_create_db(int if_ne, const char *name)
{
printf("exec CREATE-DB %d %s\n", if_ne, name);
}
void sqlp_drop_db(int if_exists, const char *name)
{
printf("exec DROP-DB %d %s\n", if_exists, name);
}
void sqlp_drop_table(int temp, int if_exists, int n_tables)
{
printf("exec DROP-TABLE %d %d %d\n", temp, if_exists, n_tables);
}
void sqlp_stmt(void)
{
printf("exec STMT\n");
}
void sqlp_table(const char *name)
{
printf("exec TABLE %s\n", name);
}