/*
 * Copyright (c) 1994, 2001 Alex Leigh, All Rights Reserved
 *
 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ALEX LEIGH The copyright
 * notice above does not evidence any actual or intended publication of such
 * source code.
 *
 * Disclosure, copying, distribution, or transmission of this code without
 * express permission is prohibited.
 */

#ifndef _DB_H
#define _DB_H

struct dbSvector {
  void (*init_fn)(void);
  void *(*open_fn)(const char *user, const char *password, const char *service);
  int (*close_fn)(void *conn);

  lstTset *(*select_fn)(void *conn, const char *sql);
  int (*getrow_fn)(void *conn, lstTset *row);

  int (*dml_fn)(void *conn, const char *sql);
};
typedef struct dbSvector dbTvector;

void dbFvector_register(dbTvector *vec);
void *dbFopen(const char *user, const char *password, const char *service);
int dbFclose(void *conn);
void dbFinit(void);
lstTset *dbFselect(void *conn, const char *sql);
int dbFgetrow(void *conn, lstTset *row);
int dbFdml(void *conn, const char *sql);

#endif

