C# Class SemWeb.Stores.SQLStore

Inheritance: Store, SupportsPersistableBNodes
ファイルを表示 Open project: JoshData/semweb-dotnet

Private Properties

Property Type Description
AddLiteral int
AppendComma void
AppendMultiRes bool
AsInt int
AsString string
CacheMultiObjects void
CheckMax void
CleanMultiRes void
CreateLikeTest string
CreateVersion bool
Escape string
FilterOpToSQL string
FilterToSQL string
GetAllEntities System.Entity[]
GetCreateIndexCommands string[]
GetCreateTableCommands string[]
GetEntityId int
GetLiteralHash string
GetLiteralId int
GetResourceId int
GetResourceIdBuffer int
GetResourceKey object
GetSelectedEntity System.Entity
GetSelectedResource Resource
IDisposable void
Init void
MakeEntity System.Entity
NextId int
ObjectType int
ParseVersionInfo System.Collections.Specialized.NameValueCollection
PrefetchResourceIds void
RunAddBuffer void
RunAddBufferDynamic void
RunScalarInt int
RunScalarString string
Select void
SelectFilterColumns void
SelectFilterTables void
SerializeVersionInfo string
SetResourceKey void
SplitArray Resource[][]
StatementSink bool
ToMultiRes Resource
WhereClause bool
WhereClause bool
WhereItem bool
isOrContains bool

Public Methods

Method Description
Add ( Statement statement ) : void
Clear ( ) : void
Close ( ) : void
Contains ( Resource resource ) : bool
Contains ( Statement template ) : bool
GetBNodeFromPersistentId ( string persistentId ) : BNode
GetEntities ( ) : System.Entity[]
GetMetas ( ) : System.Entity[]
GetPersistentBNodeId ( BNode node ) : string
GetPredicates ( ) : System.Entity[]
GetStoreGuid ( ) : string
Import ( StatementSource source ) : void
MetaQuery ( Statement graph, SemWeb options ) : SemWeb.Query.MetaQueryResult
Query ( Statement graph, SemWeb options, SemWeb sink ) : void
Remove ( Statement template ) : void
RemoveAll ( Statement templates ) : void
Replace ( System.Entity a, System.Entity b ) : void
Replace ( Statement find, Statement replacement ) : void
Select ( SelectFilter filter, StatementSink result ) : void
Select ( Statement template, StatementSink result ) : void
Select ( StatementSink result ) : void

Protected Methods

Method Description
BeginTransaction ( ) : void
CreateEntityPrefixTest ( string column, string prefix, System command ) : bool
CreateIndexes ( ) : void
CreateLikeTest ( string column, string prefix, int method, System command ) : void
CreateNullTest ( string column, System command ) : void
CreateTable ( ) : void
EndTransaction ( ) : void
EscapedAppend ( StringBuilder b, string str ) : void
RunCommand ( string sql ) : void
RunReader ( string sql ) : IDataReader
RunScalar ( string sql ) : object
SQLStore ( string table ) : System

Private Methods

Method Description
AddLiteral ( Literal literal, StringBuilder buffer, bool insertCombined, bool &firstInsert ) : int
AppendComma ( StringBuilder builder, string text, bool comma ) : void
AppendMultiRes ( MultiRes r, StringBuilder cmd ) : bool
AsInt ( object r ) : int
AsString ( object r ) : string
CacheMultiObjects ( Hashtable entMap, Resource obj ) : void
CheckMax ( string command, int &nextid ) : void
CleanMultiRes ( MultiRes res ) : void
CreateLikeTest ( string column, string match, int method ) : string
CreateVersion ( ) : bool
Escape ( string str ) : string
FilterOpToSQL ( LiteralFilter op ) : string
FilterToSQL ( LiteralFilter filter, string col ) : string
GetAllEntities ( string cols ) : System.Entity[]
GetCreateIndexCommands ( string table ) : string[]
GetCreateTableCommands ( string table ) : string[]
GetEntityId ( string uri, bool create, StringBuilder entityInsertBuffer, bool insertCombined, bool checkIfExists, bool &firstInsert ) : int
GetLiteralHash ( Literal literal ) : string
GetLiteralId ( Literal literal, bool create, StringBuilder buffer, bool insertCombined, bool &firstInsert ) : int
GetResourceId ( Resource resource, bool create ) : int
GetResourceIdBuffer ( Resource resource, bool create, StringBuilder literalInsertBuffer, StringBuilder entityInsertBuffer, bool insertCombined, bool &firstLiteralInsert, bool &firstEntityInsert ) : int
GetResourceKey ( Resource resource ) : object
GetSelectedEntity ( int id, string uri, Resource given, bool idSelected, bool uriSelected, Hashtable entMap ) : System.Entity
GetSelectedResource ( int id, int type, string uri, string lv, string ll, string ld, Resource given, bool idSelected, bool uriSelected, Hashtable entMap ) : Resource
IDisposable ( ) : void
Init ( ) : void
MakeEntity ( int resourceId, string uri, Hashtable cache ) : System.Entity
NextId ( ) : int
ObjectType ( Resource r ) : int
ParseVersionInfo ( string verdata ) : NameValueCollection
PrefetchResourceIds ( IList resources ) : void
RunAddBuffer ( ) : void
RunAddBufferDynamic ( ) : void
RunScalarInt ( string sql, int def ) : int
RunScalarString ( string sql ) : string
Select ( Resource templateSubject, Resource templatePredicate, Resource templateObject, Resource templateMeta, LiteralFilter litFilters, StatementSink result, int limit ) : void
SelectFilterColumns ( SelectColumnFilter filter, StringBuilder cmd ) : void
SelectFilterTables ( SelectColumnFilter filter, StringBuilder cmd ) : void
SerializeVersionInfo ( NameValueCollection verdata ) : string
SetResourceKey ( Resource resource, object value ) : void
SplitArray ( Resource e ) : Resource[][]
StatementSink ( Statement statement ) : bool
ToMultiRes ( Resource r ) : Resource
WhereClause ( Resource templateSubject, Resource templatePredicate, Resource templateObject, Resource templateMeta, System cmd, bool &wroteWhere ) : bool
WhereClause ( Statement template, System cmd ) : bool
WhereItem ( string col, Resource r, System cmd, bool and ) : bool
isOrContains ( Resource r, string uri ) : bool

Method Details

Add() public method

public Add ( Statement statement ) : void
statement Statement
return void

BeginTransaction() protected method

protected BeginTransaction ( ) : void
return void

Clear() public method

public Clear ( ) : void
return void

Close() public method

public Close ( ) : void
return void

Contains() public method

public Contains ( Resource resource ) : bool
resource Resource
return bool

Contains() public method

public Contains ( Statement template ) : bool
template Statement
return bool

CreateEntityPrefixTest() protected method

protected CreateEntityPrefixTest ( string column, string prefix, System command ) : bool
column string
prefix string
command System
return bool

CreateIndexes() protected method

protected CreateIndexes ( ) : void
return void

CreateLikeTest() protected abstract method

protected abstract CreateLikeTest ( string column, string prefix, int method, System command ) : void
column string
prefix string
method int
command System
return void

CreateNullTest() protected abstract method

protected abstract CreateNullTest ( string column, System command ) : void
column string
command System
return void

CreateTable() protected method

protected CreateTable ( ) : void
return void

EndTransaction() protected method

protected EndTransaction ( ) : void
return void

EscapedAppend() protected abstract method

protected abstract EscapedAppend ( StringBuilder b, string str ) : void
b StringBuilder
str string
return void

GetBNodeFromPersistentId() public method

public GetBNodeFromPersistentId ( string persistentId ) : BNode
persistentId string
return BNode

GetEntities() public method

public GetEntities ( ) : System.Entity[]
return System.Entity[]

GetMetas() public method

public GetMetas ( ) : System.Entity[]
return System.Entity[]

GetPersistentBNodeId() public method

public GetPersistentBNodeId ( BNode node ) : string
node BNode
return string

GetPredicates() public method

public GetPredicates ( ) : System.Entity[]
return System.Entity[]

GetStoreGuid() public method

public GetStoreGuid ( ) : string
return string

Import() public method

public Import ( StatementSource source ) : void
source StatementSource
return void

MetaQuery() public method

public MetaQuery ( Statement graph, SemWeb options ) : SemWeb.Query.MetaQueryResult
graph Statement
options SemWeb
return SemWeb.Query.MetaQueryResult

Query() public method

public Query ( Statement graph, SemWeb options, SemWeb sink ) : void
graph Statement
options SemWeb
sink SemWeb
return void

Remove() public method

public Remove ( Statement template ) : void
template Statement
return void

RemoveAll() public method

public RemoveAll ( Statement templates ) : void
templates Statement
return void

Replace() public method

public Replace ( System.Entity a, System.Entity b ) : void
a System.Entity
b System.Entity
return void

Replace() public method

public Replace ( Statement find, Statement replacement ) : void
find Statement
replacement Statement
return void

RunCommand() protected abstract method

protected abstract RunCommand ( string sql ) : void
sql string
return void

RunReader() protected abstract method

protected abstract RunReader ( string sql ) : IDataReader
sql string
return IDataReader

RunScalar() protected abstract method

protected abstract RunScalar ( string sql ) : object
sql string
return object

SQLStore() protected method

protected SQLStore ( string table ) : System
table string
return System

Select() public method

public Select ( SelectFilter filter, StatementSink result ) : void
filter SelectFilter
result StatementSink
return void

Select() public method

public Select ( Statement template, StatementSink result ) : void
template Statement
result StatementSink
return void

Select() public method

public Select ( StatementSink result ) : void
result StatementSink
return void