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:
Globals:

Classes

class Commands

Members

ADD = 10
BIND = 20
BUILD_NON_DISTINCT_OBJS_FROM_SUB_AND_PREDS = 110
BUILD_OBJS_FROM_SUBS_AND_PRED = 106
BUILD_OBJS_FROM_SUBS_AND_PRED_SCOPED = 108
BUILD_OBJS_FROM_SUB_AND_PREDS = 102
BUILD_OBJS_FROM_SUB_AND_PREDS_SCOPED = 104
BUILD_SUBJS_FROM_PREDS_AND_OBJ = 100
BUILD_SUBJS_FROM_PRED_AND_OBJS = 112
BUILD_SUBJS_FROM_PRED_AND_OBJS_SCOPED = 114
COMPLETE = 12
CONTAINS = 13
HAS_KEY = 24
IS_RESOURCE = 46
KEYS = 23
LOOKUP = 22
OBJECT_LIST = 38
OBJECT_LIST_SCOPED = 40
PREDICATE_LIST = 34
PREDICATE_LIST_SCOPED = 36
REMOVE = 11
RESOURCE_OBJECT_LIST = 42
RESOURCE_OBJECT_LIST_SCOPED = 44
SIZE = 14
SIZE_ALL = 15
SUBJECT_LIST = 30
SUBJECT_LIST_SCOPED = 32
UNBIND = 21
class SqlAdapter

Methods

__init__(self, sqlCommands, comparisons, modelName)
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 predicates and subject
objectsFromSubsAndPred(self, subjects, predicate, scope)
Get a list of obejcts with the given predicate and subjects
objectsFromSubsAndPredNonDistinct(self, subjects, predicate, scope)
Get a list of *non-distinct* objects with the given predicate and subjects
remove(self, statements)
removePattern(self, subject, predicate, object, statementUri, scope, flags)
resources(self, scope)
rollback(self)
size(self, scope)
subjectsFromPredAndObjs(self, predicate, objects, scope)
Get a list of resources with the given predicate and object
subjectsFromPredsAndObj(self, predicates, object, scope)
unbind(self, name, scope)

Functions

EscapeQuotes = lambda(s)
# could be None
dec_utf8 = lambda(x)

Globals

OBJECT_TYPE_UNKNOWN = '?'