1/*
2** Copyright (c) 2008 D. Richard Hipp
3**
4** This program is free software; you can redistribute it and/or
5** modify it under the terms of the GNU General Public
6** License version 2 as published by the Free Software Foundation.
7**
8** This program is distributed in the hope that it will be useful,
9** but WITHOUT ANY WARRANTY; without even the implied warranty of
10** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11** General Public License for more details.
12**
13** You should have received a copy of the GNU General Public
14** License along with this library; if not, write to the
15** Free Software Foundation, Inc., 59 Temple Place - Suite 330,
16** Boston, MA 02111-1307, USA.
17**
18** Author contact information:
19** drh@hwaci.com
20** http://www.hwaci.com/drh/
21**
22*******************************************************************************
23**
24** This module defines the interfaces to the sqllogictest program.
25*/
26
27/*
28** The interface to each database engine is an instance of the
29** following structure.
30*/
31typedef struct DbEngine DbEngine;
32struct DbEngine {
33 const char *zName; /* Name of this engine */
34 void *pAuxData; /* Aux data passed to xConnect */
35 int (*xConnect)(void *, const char *zCon, void **ppConn, const char *zOpt);
36 int (*xGetEngineName)(void *, const char **zName);
37 int (*xStatement)(void *, const char *zSql, int bQuiet); /* True to suppress printing errors. */
38 int (*xQuery)(void *, const char *zSql, const char *zTypes, char ***pazResult, int *pnResult);
39 int (*xFreeResults)(void *, char **azResult, int nResult);
40 int (*xDisconnect)(void *);
41};
42
43/*
44** Each database engine interface invokes the following routine
45** to register itself with the main sqllogictest driver.
46*/
47void sqllogictestRegisterEngine(const DbEngine *);
48
49/*
50** MD5 hashing routines.
51*/
52void md5_add(const char *z);
53const char *md5_finish(void);
54