4Suite API Documentation

Module Ft.Rdf.Drivers.SQL

Routines for RDF drivers that use ANSI SQL databases (MySQL, Postgres, maybe others)
Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/
Classes:
Functions:

Classes

class Commands(type)

Methods

__init__(cls, name, bases, namespace)
Overrides: __init__ from class type
named_repl = <lambda>(m)
# Escape the replacements again for the addtional expansion # that occurs prior to the SQL parameter expansion.

Methods inherited from class type

__call__, __cmp__, __delattr__, __getattribute__, __hash__, __new__, __repr__, __setattr__, __subclasses__, mro

Methods inherited from class object

__reduce__, __reduce_ex__, __str__

Members

ADD = 10
BIND = 20
COMPLETE = 12
CONTAINS = 13
HAS_KEY = 24
IS_RESOURCE = 36
KEYS = 23
LOOKUP = 22
OBJECTS_FROM_SUB_AND_PREDS = 54
OBJECTS_FROM_SUB_AND_PREDS_SCOPED = 55
OBJECT_LIST = 34
OBJECT_LIST_SCOPED = 35
PREDICATE_LIST = 32
PREDICATE_LIST_SCOPED = 33
REMOVE = 11
SIZE = 14
SIZE_ALL = 15
SUBJECTS_FROM_PREDS_AND_OBJ = 50
SUBJECTS_FROM_PREDS_AND_OBJ_SCOPED = 51
SUBJECTS_FROM_PRED_AND_OBJS = 52
SUBJECTS_FROM_PRED_AND_OBJS_SCOPED = 53
SUBJECT_LIST = 30
SUBJECT_LIST_SCOPED = 31
UNBIND = 21
bits = 31
cmd = (12, True, False, False, True, True)
complete = 'SELECT * FROM ftrdf_%s_statement WHERE subject%%...UriOp)s:statementUri AND domain%%(scopeOp)s:scope'
contains = 'SELECT COUNT(subject) FROM ftrdf_%s_statement WH...UriOp)s:statementUri AND domain%%(scopeOp)s:scope'
key = (True, True, True, True, True)
parts = ['subject%%(subjectOp)s:subject', 'predicate%%(predicateOp)s:predicate', 'object%%(objectOp)s:object', 'statementUri%%(statementUriOp)s:statementUri', 'domain%%(scopeOp)s:scope']
qmark_repl = '%%%%s'
remove = 'DELETE FROM ftrdf_%s_statement WHERE subject%%(s...UriOp)s:statementUri AND domain%%(scopeOp)s:scope'
sql = 'SELECT * FROM ftrdf_%s_statement WHERE subject%%...statementUri)s AND domain%%(scopeOp)s%%%%(scope)s'
where = ' WHERE subject%%(subjectOp)s:subject AND predica...UriOp)s:statementUri AND domain%%(scopeOp)s:scope'

Members inherited from class type

__base__, __bases__, __basicsize__, __dict__, __dictoffset__, __flags__, __itemsize__, __mro__, __weakrefoffset__

Members inherited from class object

__class__
class SqlAdapter(object)

Methods

__init__(self, modelName, conn=None)
Overrides: __init__ from class object
add(self, statements)
begin(self)
bind(self, object, name, scope)
commit(self)
complete(self, subject, predicate, object, statementUri, scope, flags)
contains(self, subject, predicate, object, statementUri, scope, flags)
has_key(self, name, scope)
isResource(self, res)
keys(self, scope)
lookup(self, name, scope)
objectsFromSubAndPreds(self, subject, predicates, scope)
Get a list of obejcts with the given predicate and subjects
prepare(self)
remove(self, statements)
removePattern(self, subject, predicate, object, statementUri, scope, flags)
resources(self, scope)
rollback(self)
size(self, scope=None)
subjectsFromPredAndObjs(self, predicate, objects, scope)
Get a list of resources with the given predicate and objects
subjectsFromPredsAndObj(self, predicates, object, scope)
Get a list of resources with the given predicates and object
unbind(self, name, scope)

Methods inherited from class object

__delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Members

__dict__ = <attribute '__dict__' of 'SqlAdapter' objects>
__metaclass__ = <class 'Ft.Rdf.Drivers.SQL.Commands'>
__weakref__ = <attribute '__weakref__' of 'SqlAdapter' objects>
comparison = None
paramstyle = None
properties = {1: True, 2: True}

Members inherited from class object

__class__

Functions

ParseRdfDsn(dsn)