Package csb :: Package io :: Module tsv :: Class SQLiteRepository
[frames] | no frames]

Class SQLiteRepository

source code

   object --+    
            |    
RepositoryImp --+
                |
               SQLiteRepository

SQLite-based concrete repository implementor. This is the default Table backend.

Nested Classes
  ChunkedReader

Inherited from RepositoryImp: __metaclass__

Instance Methods
 
__init__(self, tablename)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
close(self)
Perform cleanup (e.g.
source code
int
count(self)
Count the number of rows in the table.
source code
 
create(self, metadata)
Create a table given metadata.
source code
 
execute(self, exp)
Perform a select operation given expression.
source code
 
insert(self, row)
Insert a new tuple in the table.
source code
 
query(self, sql, params=None)
Execute a native SQL query against the backend, as-is.
source code
 
update(self, exp)
Perform an update operation given expression.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  PK = 'ROWID'
  TYPES = {<type 'float'>: 'REAL', <type 'int'>: 'BIGINT', <type...
  __abstractmethods__ = frozenset([])
Properties
  pk

Inherited from RepositoryImp: table

Inherited from object: __class__

Method Details

__init__(self, tablename)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

close(self)

source code 

Perform cleanup (e.g. close connections).

Overrides: RepositoryImp.close
(inherited documentation)

count(self)

source code 

Count the number of rows in the table.

Returns: int
Overrides: RepositoryImp.count
(inherited documentation)

create(self, metadata)

source code 

Create a table given metadata.

Returns:
void
Overrides: RepositoryImp.create
(inherited documentation)

execute(self, exp)

source code 

Perform a select operation given expression.

Returns:
data reader (2D iterable)
Overrides: RepositoryImp.execute
(inherited documentation)

insert(self, row)

source code 

Insert a new tuple in the table.

Returns:
void
Overrides: RepositoryImp.insert
(inherited documentation)

query(self, sql, params=None)

source code 

Execute a native SQL query against the backend, as-is.

Parameters:
  • sql - SQL query
  • params - query bound parameters, if any
Returns:
data reader (2D iterable)
Overrides: RepositoryImp.query
(inherited documentation)

update(self, exp)

source code 

Perform an update operation given expression.

Returns:
void
Overrides: RepositoryImp.update
(inherited documentation)

Class Variable Details

TYPES

Value:
{<type 'float'>: 'REAL',
 <type 'int'>: 'BIGINT',
 <type 'str'>: 'VARCHAR'}

Property Details

pk

Get Method:
unreachable.pk(self)