org.xerial.db.sql.sqlite
Class SQLiteAccess

java.lang.Object
  extended by org.xerial.db.sql.DatabaseAccessBase
      extended by org.xerial.db.sql.sqlite.SQLiteAccess
All Implemented Interfaces:
DatabaseAccess

public class SQLiteAccess
extends DatabaseAccessBase

SQLiteAccess is not thread safe.

Author:
leo

Constructor Summary
SQLiteAccess()
          Create an memory database access
SQLiteAccess(ConnectionPool connectionPool)
           
SQLiteAccess(String filePath)
           
 
Method Summary
<T> List<T>
amoebaQuery(Class<T> beanClass, String tableName)
           
 void createTable(String tableName, Relation r)
           
 void deleteByKeyValue(Object bean, String tableName)
           
 void dropTable(String tableName)
           
 SQLiteCatalog getCatalog()
           
 Relation getRelationSchema(String tableName)
           
 List<SQLiteDataTypeInfo> getSQLiteDataTypeInfo(String tableName)
           
 Collection<String> getTableList()
           
 boolean hasTable(String tableName)
           
 List<JSONObject> jsonQuery(String sql)
           
 List<JSONValue> selectColumnData(String sql, String targetColumn)
           
 
Methods inherited from class org.xerial.db.sql.DatabaseAccessBase
accumulate, createStatement, createValueTupleFromBean, dispose, getConnectionPool, getRelation, getTableNameList, insert, query, query, query, queryWithHandler, setAutoCommit, setQueryTimeout, singleColumnQuery, toJSON, update, update, updateWithPreparedStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLiteAccess

public SQLiteAccess()
             throws DBException
Create an memory database access

Throws:
DBException

SQLiteAccess

public SQLiteAccess(String filePath)
             throws DBException
Throws:
DBException

SQLiteAccess

public SQLiteAccess(ConnectionPool connectionPool)
             throws DBException
Throws:
DBException
Method Detail

getCatalog

public SQLiteCatalog getCatalog()
                         throws DBException
Throws:
DBException

getTableList

public Collection<String> getTableList()
                                throws DBException
Throws:
DBException

getSQLiteDataTypeInfo

public List<SQLiteDataTypeInfo> getSQLiteDataTypeInfo(String tableName)
                                               throws DBException
Throws:
DBException

getRelationSchema

public Relation getRelationSchema(String tableName)
                           throws DBException
Throws:
DBException

deleteByKeyValue

public void deleteByKeyValue(Object bean,
                             String tableName)
                      throws DBException,
                             BeanException
Throws:
DBException
BeanException

createTable

public void createTable(String tableName,
                        Relation r)
                 throws DBException
Throws:
DBException

dropTable

public void dropTable(String tableName)
               throws DBException
Throws:
DBException

amoebaQuery

public <T> List<T> amoebaQuery(Class<T> beanClass,
                               String tableName)
                    throws DBException
Throws:
DBException

selectColumnData

public List<JSONValue> selectColumnData(String sql,
                                        String targetColumn)
                                 throws DBException
Throws:
DBException

jsonQuery

public List<JSONObject> jsonQuery(String sql)
                           throws DBException
Parameters:
sql -
Returns:
Throws:
DBException

hasTable

public boolean hasTable(String tableName)
                 throws DBException
Throws:
DBException


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 2.1 Japan License.