4Suite™ API Documentation

# ► Module Ft.Rdf.Drivers.Odbc

A persistent RDF model driver using the pywin32 odbc driver
See http://starship.python.net/crew/mhammond/win32/
and https://sourceforge.net/projects/pywin32/
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/

Classes: DbAdapter |  |  |  | Functions: BuildObjectsFromSubAndPreds, BuildSubjectsFromPredAndObjs, BuildSubjectsFromPredsAndObj, CreateDb, DestroyDb, ExistsDb, GetDb, InitializeModule, SplitConnectString |  |  |  | Fields: CREATE_BOUND_TABLE, CREATE_STATEMENT_TABLE, INDICES, bits, complete, contains, key, parts, remove, where

## Classes

class DbAdapter(Ft.Rdf.Drivers.SQL.SqlAdapter)

### Methods

__init__(self, dbiKeywords, model='default', db=None)
begin(self)
commit(self)
rollback(self)

### Methods inherited from class Ft.Rdf.Drivers.SQL.SqlAdapter

add, bind, complete, contains, has_key, isResource, keys, lookup, objectsFromSubAndPreds, objectsFromSubsAndPred, objectsFromSubsAndPredNonDistinct, remove, removePattern, resources, size, subjectsFromPredAndObjs, subjectsFromPredsAndObj, unbind

## Functions

BuildObjectsFromSubAndPreds(subject, predicates, model)
BuildSubjectsFromPredAndObjs(predicate, objects, model)
BuildSubjectsFromPredsAndObj(predicates, object, model)
CreateDb(dbiKeywords, model='default')
DestroyDb(dbiKeywords, model='default')
ExistsDb(dbiKeywords, model='default')
GetDb(dbName, modelName='default')
InitializeModule()
Post-import hook to initialize module's runtime variables that are not required at import time, but will be needed before the module-level functions are called.
SplitConnectString(connString)

## Fields

CREATE_BOUND_TABLE = '\nCREATE TABLE ftrdf_%s_bound (\n name varchar,\n object varchar,\n domain varchar)\n'
CREATE_STATEMENT_TABLE = '\nCREATE TABLE ftrdf_%s_statement (\n subject ... statementUri varchar,\n domain varchar)\n'
INDICES = {'binding': ('ftrdf_%s_bound', ['name']), 'po': ('ftrdf_%s_statement', ['predicate', 'object']), 'source': ('ftrdf_%s_statement', ['domain']), 'sp': ('ftrdf_%s_statement', ['subject', 'predicate'])}
bits = 31
complete = "SELECT * FROM ftrdf_%(modelName)s_statement WHE...tatementUri)s' AND domain%(domainOp)s'%(domain)s'"
contains = "SELECT COUNT(subject) FROM ftrdf_%(modelName)s_s...tatementUri)s' AND domain%(domainOp)s'%(domain)s'"
key = (True, True, True, True, 1)
parts = ["subject%(subjectOp)s'%(subject)s'", "predicate%(predicateOp)s'%(predicate)s'", "object%(objectOp)s'%(object)s'", "statementUri%(statementUriOp)s'%(statementUri)s'", "domain%(domainOp)s'%(domain)s'"]
remove = "DELETE FROM ftrdf_%(modelName)s_statement WHERE...tatementUri)s' AND domain%(domainOp)s'%(domain)s'"
where = "subject%(subjectOp)s'%(subject)s' AND predicate%...tatementUri)s' AND domain%(domainOp)s'%(domain)s'"