/*
 * 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.
 */

#include <continuity.h>
#include "db.h"

static dbTvector *vector = NULL;

void dbFvector_register(dbTvector * vec)
{
    vector = vec;
}

void *dbFopen(const char *user, const char *password, const char *service)
{
    return (*vector->open_fn) (user, password, service);
}

int dbFclose(void *conn)
{
    return (*vector->close_fn) (conn);
}

lstTset *dbFselect(void *conn, const char *sql)
{
    return (*vector->select_fn) (conn, sql);
}

void dbFinit(void)
{
    (*vector->init_fn) ();
}

int dbFgetrow(void *conn, lstTset * row)
{
    return (*vector->getrow_fn) (conn, row);
}

int dbFdml(void *conn, const char *sql)
{
    return (*vector->dml_fn) (conn, sql);
}
