01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: com_mckoi_JDBCDriver.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.database.testdatabasedrivers;
09:
10: import com.uwyn.rife.database.Datasource;
11: import com.uwyn.rife.database.exceptions.DatabaseException;
12: import com.uwyn.rife.database.queries.Insert;
13: import com.uwyn.rife.database.queries.Select;
14:
15: public class com_mckoi_JDBCDriver extends generic {
16: public com_mckoi_JDBCDriver(Datasource datasource) {
17: super (datasource);
18:
19: mStore = new Insert(getDatasource()).into(
20: mCreateStructure.getTable()).fieldParameter("id")
21: .fieldParameter("valuecol");
22:
23: mCount = new Select(getDatasource()).from(
24: mCreateStructure.getTable()).field("count(*)");
25: }
26:
27: public void store(int id, String value) throws DatabaseException {
28: _store(mStore, id, value);
29: }
30:
31: public int count() throws DatabaseException {
32: return _count(mCount);
33: }
34: }
|