Package rdflib :: Package store :: Package FOPLRelationalModel :: Module BinaryRelationPartition :: Class NamedLiteralProperties
[show private | hide private]
[frames | no frames]

Type NamedLiteralProperties

             object --+    
                      |    
BinaryRelationPartition --+
                          |
                         NamedLiteralProperties


The partition associated with assertions where the object is a Literal.
Method Summary
  __init__(self, identifier, idHash, valueHash)
  compileQuadToParams(self, quadSlots)
  extractIdentifiers(self, quadSlots)
  flushInsertions(self, db)
Adds the pending identifiers / values and assertions (using executemany for maximum efficiency), and resets the queue.
  foreignKeySQL(self, slot)
Generates foreign key expression relating a particular quad term with the identifier hash
  insertRelations(self, quadSlots)
Takes a list of QuadSlot objects and queues the new identifiers / values to insert and the assertions as well (so they can be added in a batch for maximum efficiency)
  insertRelationsSQLCMD(self)
Generates a SQL command with parameter references (%s) in order to facilitate efficient batch insertion of multiple assertions by Python DB implementations (such as MySQLdb)
  selectFields(self, first)
Returns a list of column aliases for the SELECT SQL command used to fetch quads from a partition
    Inherited from BinaryRelationPartition
  __repr__(self)
  createSQL(self)
Generates a CREATE TABLE statement which creates a SQL table used for persisting assertions associated with this partition
  generateHashIntersections(self)
Generates the SQL JOINS (INNER and LEFT) used to intersect the identifier and value hashes with this partition.
  generateWhereClause(self, queryPattern)
Takes a query pattern (a list of quad terms - subject,predicate,object,context) and generates a SQL WHERE clauses which works in conjunction to the intersections to filter the result set by partial matching (by REGEX), full matching (by integer half-hash), and term types.
  IndexManagementSQL(self, create)
  selectContextFields(self, first)
Generates a list of column aliases for the SELECT SQL command used in order to fetch contexts from each partition
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
list columnIntersectionList = [(4, True), (1, True), (3, True...
list columnNames = ['subject', 'predicate', 'object', 'contex...
dict hardCodedResultFields = {}
dict hardCodedResultTermsTypes = {2: 'L'}
str nameSuffix = 'literalProperties'
list termEnumerations = [['U', 'B', 'F', 'V'], ['U', 'V'], No...
    Inherited from BinaryRelationPartition
str assertedColumnName = 'asserted'
str indexSuffix = 'Index'

Method Details

flushInsertions(self, db)

Adds the pending identifiers / values and assertions (using executemany for maximum efficiency), and resets the queue.
Overrides:
rdflib.store.FOPLRelationalModel.BinaryRelationPartition.BinaryRelationPartition.flushInsertions (inherited documentation)

foreignKeySQL(self, slot)

Generates foreign key expression relating a particular quad term with the identifier hash
Overrides:
rdflib.store.FOPLRelationalModel.BinaryRelationPartition.BinaryRelationPartition.foreignKeySQL (inherited documentation)

insertRelations(self, quadSlots)

Takes a list of QuadSlot objects and queues the new identifiers / values to insert and the assertions as well (so they can be added in a batch for maximum efficiency)
Overrides:
rdflib.store.FOPLRelationalModel.BinaryRelationPartition.BinaryRelationPartition.insertRelations (inherited documentation)

insertRelationsSQLCMD(self, dataType=None, language=None)

Generates a SQL command with parameter references (%s) in order to facilitate efficient batch insertion of multiple assertions by Python DB implementations (such as MySQLdb)
Overrides:
rdflib.store.FOPLRelationalModel.BinaryRelationPartition.BinaryRelationPartition.insertRelationsSQLCMD (inherited documentation)

selectFields(self, first=False)

Returns a list of column aliases for the SELECT SQL command used to fetch quads from a partition
Overrides:
rdflib.store.FOPLRelationalModel.BinaryRelationPartition.BinaryRelationPartition.selectFields (inherited documentation)

Class Variable Details

columnIntersectionList

Type:
list
Value:
[(4, True), (1, True), (3, True), (2, False), (0, True)]               

columnNames

Type:
list
Value:
['subject',
 'predicate',
 'object',
 'context',
 ('data_type', 'BIGINT unsigned', '%s'),
 ('language', 'varchar(3)', '%s(3)')]                                  

hardCodedResultFields

Type:
dict
Value:
{}                                                                     

hardCodedResultTermsTypes

Type:
dict
Value:
{2: 'L'}                                                               

nameSuffix

Type:
str
Value:
'literalProperties'                                                    

termEnumerations

Type:
list
Value:
[['U', 'B', 'F', 'V'], ['U', 'V'], None, ['U', 'B', 'F']]              

Generated by Epydoc 2.1 on Wed Apr 4 16:05:45 2007 http://epydoc.sf.net