/****************************************************************************
 * KONOHA COPYRIGHT, LICENSE NOTICE, AND DISCRIMER  
 * 
 * Copyright (c) 2005-2008, Kimio Kuramitsu <kimio at ynu.ac.jp>
 *           (c) 2008-      Konoha Software Foundation  
 * All rights reserved.
 * 
 * You may choose one of the following two licenses when you use konoha. 
 * See www.konohaware.org/license.html for further information.
 * 
 * (1) GNU General Public License 2.0      (with    KONOHA_UNDER_GPL2)
 * (2) Konoha Software Foundation License 1.0
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 
 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *  
 ****************************************************************************/

/* ************************************************************************ */

#include"commons.h"

/* ************************************************************************ */

#ifdef __cplusplus 
extern "C" {
#endif

/* ======================================================================== */
/* [define] */

/* ======================================================================== */
/* [structs] */

void dbw_Connection_struct_init(Ctx *ctx, Struct *s1, int init, Object *cs)
{
//	Connection *b =  (Connection*)s1;

}

/* ------------------------------------------------------------------------ */

void dbw_Connection_struct_copy(Ctx *ctx, Struct *s1, Struct *s2)
{
//	Connection *b =  (Connection*)s1;
//	Connection *b2 = (Connection*)s2;

}

/* ------------------------------------------------------------------------ */

#define  _dbw_Conncetion_struct_compare NULL

/* ------------------------------------------------------------------------ */

void dbw_Connection_struct_traverse(Ctx *ctx, Struct *s, f_gc gc)
{
//	Connection *b = (Connection*)s;

}

/* ======================================================================== */
/* [constructors] */


Connection* new_Connection(Ctx *ctx, String *urn, String *uname, String *upwd)
{
#ifdef CLASS_Connection
	Connection *b = (Connection*)knh_Object_malloc0(ctx, OF_Connection, CLASS_Connection, sizeof(Connection));
	dbw_Connection_struct_init(ctx, (Struct*)b, 0, NULL);
	return b;
#else
	return Null;
#endif
}

/* ======================================================================== */
/* [sql] */

DataTuple* dbw_Connection_execSQL(Ctx *ctx, dbw_Connection *b, char *sql)
{
	return b->func.execSQL(ctx, b, sql);
}

/* ------------------------------------------------------------------------ */

DataTuple* dbw_Connection_execSPARQL(Ctx *ctx, dbw_Connection *b, char *query)
{
	return Null;
}


/* ======================================================================== */
/* [map] */

Object *dbw_Connection_execMap(Ctx *ctx, dbw_Connection *b, MapMap *map)
{
//	KNH_ASSERT(IS_Connection(mapdata));
//	Connection *b = (Connection*)mapdata;
	return Null;
}

/* ------------------------------------------------------------------------ */


#ifdef __cplusplus
}
#endif
