|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.isi.powerloom.rdbms.RDBMS
public class RDBMS
Constructor Summary | |
---|---|
RDBMS()
|
Method Summary | |
---|---|
static Iterator |
allocateDbtableSpecialistIterator(ControlFrame frame)
|
static Iterator |
allocateQuerySpecialistIterator(ControlFrame frame)
|
static Iterator |
allocateResultSetIterator(edu.isi.sdbc.Connection connection,
LogicObject relation,
java.lang.String sqlstatement)
|
static void |
assertRdbmsConnectionInfo(java.lang.String dbInstanceName,
Cons options)
Assert DB connectivity information about the DB instance dbInstanceName (for
example, "edb") according to options . |
static void |
assertRdbmsConnectionInfoEvaluatorWrapper(Cons arguments)
|
static Cons |
buildOneTableAssertion(NamedDescription tableRelation,
Cons tuple,
Module dbModule)
|
static LogicObject |
callDefdb(Cons arguments)
Callable version of of the defdb command (which see). |
static NamedDescription |
callDefquery(Cons arguments)
Callable version of the defquery command (which see). |
static NamedDescription |
callDeftable(Cons arguments)
Callable version of the deftable command (which see). |
static NamedDescription |
callDefuntable(Cons arguments)
Callable version of the deftable command (which see). |
static void |
checkForExternalDbUpdates(Proposition proposition,
LogicObject database)
|
static java.lang.String |
coercePowerloomObjectToString(Stella_Object renamed_Object,
NamedDescription type)
|
static Stella_Object |
coerceStringToPowerloomObject(java.lang.String value,
NamedDescription type,
Module module,
boolean localP)
|
static Cons |
coerceValues(Cons values,
RelationTableInfo table)
|
static Cons |
collectionValuedConstraintElements(Stella_Object argument)
|
static boolean |
collectionValuedConstraintP(Stella_Object argument)
|
static edu.isi.sdbc.Connection |
connectToDatabase(LogicObject database)
|
static RelationTableInfo |
createRelationTableInfo(NamedDescription relation)
|
static java.lang.String |
createSqlAssertionFromProposition(Proposition proposition,
Keyword mode)
|
static java.lang.String |
createSqlFromProposition(Proposition proposition)
|
static void |
dbRelationGoesFalse(Proposition proposition)
|
static void |
dbRelationGoesTrue(Proposition proposition)
|
static void |
dbRelationGoesUnknown(Proposition proposition)
|
static void |
dbRelationUpdateDemon(Proposition proposition,
Keyword updateMode)
|
static Keyword |
dbtableSpecialist(ControlFrame frame,
Keyword lastmove)
|
static void |
dbUpdateDemon(Proposition dbproposition)
|
static LogicObject |
defdb(Cons args)
Define (or redefine) a database instance. |
static LogicObject |
defdbEvaluatorWrapper(Cons arguments)
|
static LogicObject |
defquery(Cons args)
Define (or redefine) an (external) query and map it to a relation. |
static LogicObject |
defqueryEvaluatorWrapper(Cons arguments)
|
static LogicObject |
deftable(Cons args)
Define (or redefine) a database table and map it to a relation. |
static LogicObject |
deftableEvaluatorWrapper(Cons arguments)
|
static LogicObject |
defuntable(Cons args)
Define (or redefine) a database table and map it to a function The accepted syntax is: (defuntable <relconst> <dbconst> <tablename> (<columndecl>+) [<keyword-option>*]). |
static LogicObject |
defuntableEvaluatorWrapper(Cons arguments)
|
static void |
disconnectFromDatabase(LogicObject database)
|
static void |
evaluateFetchQuery(KeyValueList keys,
java.io.PrintStream out)
|
static Cons |
extractRdbmsOptions(Symbol selfname,
Cons options,
java.lang.Object[] MV_returnarray)
|
static Iterator |
fetchEdbQuery(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static Cons |
fetchQueryAssertions(java.lang.String host,
int port,
LogicObject fetchQuery,
java.lang.String taskId,
java.lang.String subtaskId,
java.lang.String database,
java.lang.String parameterValue,
Module targetModule,
Module dbModule)
Runs a fetchQuery using taskId ; subtaskId ,database
and specifying a single additional parameterValue . |
static Stella_Object |
findOrCreateInstance(java.lang.String name,
NamedDescription type,
Module module,
boolean localP)
Find an existing instance with name in module or create one with type
if it does not yet exist. |
static Cons |
generateTableAssertions(java.lang.String tableName,
Cons xmlAnswer,
Module module,
Module dbModule)
Takes a Stella-parsed, XML-encoded xmlAnswer from Fetch based on
the database table tableName and uses it to generate an assertion
for an appropriate relation for inclusion in module . |
static edu.isi.sdbc.Connection |
getConnectionFromDatabase(LogicObject database)
|
static edu.isi.sdbc.Connection |
getConnectionFromPredicate(Surrogate relationref)
|
static Skolem |
getFunctionAndValueTerms(Proposition proposition,
java.lang.Object[] MV_returnarray)
|
static Surrogate |
getPropositionBaseRelationRef(Proposition prop)
|
static Cons |
getQueryPatternEvaluators(Surrogate relationref)
|
static Stella_Object |
getQueryPatternMemoizationKey(Proposition proposition)
|
static RelationTableInfo |
getRelationTableInfo(NamedDescription tablerelation)
|
static int |
getTableColumnIndex(NamedDescription tableRelation,
java.lang.String columnName,
Module module)
|
static StringWrapper |
getTableColumnModuleName(NamedDescription tablerelation,
int columnindex)
|
static StringWrapper |
getTableColumnModuleReference(NamedDescription tablerelation,
int columnindex)
|
static StringWrapper |
getTableColumnName(NamedDescription tablerelation,
int columnindex)
|
static Cons |
getTableColumnNames(NamedDescription tablerelation)
|
static NamedDescription |
getTableRelation(java.lang.String tableName,
Module module)
|
static Iterator |
helpMemoizeFetchEdbQuery(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static Iterator |
helpMemoizeSqlJoin(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static Iterator |
helpMemoizeSqlQuery(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static java.lang.String |
lookupStringValue(NamedDescription relation,
LogicObject instance,
Module mod)
|
static StringWrapper |
normalizeConnectionArgument(Stella_Object arg)
|
static java.lang.String |
normalizeFetchQueryArguments(Proposition proposition,
Stella_Object arguments,
java.lang.Object[] MV_returnarray)
|
static int |
numberStringToInteger(java.lang.String x)
|
static Cons |
parseColumnSpecs(Stella_Object relconst,
Stella_Object columnspecs,
java.lang.Object[] MV_returnarray)
|
static Cons |
parseFetchXmlAnswer(Cons xmlanswer,
NamedDescription relation,
Cons outputcolumns)
|
static PropertyList |
parseOneColumnSpec(Stella_Object columnspec)
|
static Cons |
parseOneFetchXmlObject(Cons renamed_Object,
NamedDescription relation,
Cons outputcolumns)
|
static void |
printArgumentConstraint(OutputStream sql,
Stella_Object argument,
RelationColumnInfo column)
|
static void |
printColumnConstraint(OutputStream sql,
RelationColumnInfo column,
java.lang.String value,
boolean casesensitiveP)
|
static void |
printSqlColumnList(OutputStream stream,
RelationTableInfo tableInfo)
|
static void |
printSqlConstraintList(OutputStream stream,
RelationTableInfo tableInfo,
Vector arguments)
|
static void |
printSqlValue(OutputStream stream,
Stella_Object value,
RelationColumnInfo column)
|
static Keyword |
querySpecialist(ControlFrame frame,
Keyword lastmove)
|
static boolean |
resultSetIteratorNextP(AllPurposeIterator self)
|
static Keyword |
retrieveNextDbQuerySolution(ControlFrame frame,
Keyword lastmove)
|
static Stella_Object |
runFetchQuery(java.lang.String host,
int port,
java.lang.String queryId,
java.lang.String taskId,
java.lang.String subtaskId,
java.lang.String database,
java.lang.String parameters)
Runs a Fetch query specifying the parameters given. |
static Iterator |
sqlJoin(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static Iterator |
sqlQuery(Proposition proposition,
LogicObject database,
Stella_Object arguments)
|
static java.lang.String |
sqlQueryInstantiateConstraints(java.lang.String sql,
KeyValueList bindings)
|
static void |
startFetchEdbGateway(int port)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Symbol SYM_RDBMS_DATABASE
public static Keyword KWD_DOCUMENTATION
public static Symbol SYM_RDBMS_SQL_DATABASE
public static Symbol SYM_RDBMS_PROTOCOL
public static Keyword KWD__g
public static Keyword KWD_GOES_TRUE_DEMON
public static Symbol SYM_RDBMS_DB_UPDATE_DEMON
public static Keyword KWD_GOES_UNKNOWN_DEMON
public static Symbol SYM_RDBMS_SERVER_TYPE
public static Symbol SYM_RDBMS_DSN
public static Symbol SYM_RDBMS_CONNECTION_STRING
public static Symbol SYM_RDBMS_ODBC_CONNECTION_STRING
public static Symbol SYM_RDBMS_JDBC_CONNECTION_STRING
public static Symbol SYM_RDBMS_HOST
public static Symbol SYM_RDBMS_PORT
public static Symbol SYM_RDBMS_USER
public static Symbol SYM_RDBMS_PASSWORD
public static Symbol SYM_RDBMS_DB_NAME
public static Symbol SYM_RDBMS_DB_CONNECTION
public static Keyword KWD_AXIOMS
public static Symbol SYM_RDBMS_RELATION_TABLE
public static Symbol SYM_RDBMS_RELATION_DATABASE
public static Symbol SYM_RDBMS_RELATION_COLUMN_NAME
public static Symbol SYM_RDBMS_RELATION_COLUMN_MODULE_NAME
public static Symbol SYM_RDBMS_RELATION_COLUMN_MODULE_REFERENCE
public static Symbol SYM_RDBMS_QUERY_EVALUATOR
public static Symbol SYM_RDBMS_SUPPORTS_DB_TYPE
public static Keyword KWD_CLOSED
public static Symbol SYM_STELLA_TRUE
public static Symbol SYM_RDBMS_QUERY_PATTERN
public static Symbol SYM_RDBMS_FETCH_EDB_DATABASE
public static Symbol SYM_RDBMS_TASK_ID
public static Symbol SYM_RDBMS_SUBTASK_ID
public static Symbol SYM_RDBMS_FETCH_QUERY
public static Symbol SYM_RDBMS_FETCH_QUERY_TYPE_1
public static Symbol SYM_RDBMS_FETCH_QUERY_TYPE_2
public static Symbol SYM_RDBMS_QUERY_TABLE_NAME
public static Symbol SYM_RDBMS_QUERY_PARAMETER_NAME
public static Symbol SYM_RDBMS_STARTUP_ONTOLOGY
public static Symbol SYM_STELLA_METHOD_STARTUP_CLASSNAME
public static Symbol SYM_RDBMS_DEFUNTABLE
public static Symbol SYM_PL_KERNEL_KB_RELATION_SPECIALIST
public static Symbol SYM_RDBMS_DBTABLE_SPECIALIST
public static Symbol SYM_RDBMS_DEFTABLE
public static Surrogate SGT_STELLA_CONS
public static Keyword KWD_ERROR
public static Keyword KWD_NAME
public static Keyword KWD_VARIABLE
public static Keyword KWD_TYPE
public static Keyword KWD_MODULE_NAME
public static Keyword KWD_MODULE_REFERENCE
public static Symbol SYM_RDBMS_DEFDB
public static Keyword KWD_CONNECTION_STRING
public static Surrogate SGT_STELLA_STRING
public static Keyword KWD_JDBC_CONNECTION_STRING
public static Keyword KWD_ODBC_CONNECTION_STRING
public static Keyword KWD_DSN
public static Keyword KWD_DB
public static Keyword KWD_HOST
public static Keyword KWD_PORT
public static Surrogate SGT_STELLA_INTEGER
public static Keyword KWD_USER
public static Keyword KWD_PASSWORD
public static Keyword KWD_MODULE
public static Surrogate SGT_STELLA_MODULE
public static Keyword KWD_CONFIGURATION
public static Surrogate SGT_STELLA_CONFIGURATION_TABLE
public static Keyword KWD_DB_NAME
public static Symbol SYM_RDBMS_DEFQUERY
public static Symbol SYM_RDBMS_QUERY_SPECIALIST
public static Surrogate SGT_RDBMS_CONNECTION_WRAPPER
public static Symbol SYM_STELLA_WRAPPER_VALUE
public static Surrogate SGT_LOGIC_LOGIC_OBJECT
public static Surrogate SGT_RDBMS_PROTOCOL
public static Surrogate SGT_RDBMS_SERVER_TYPE
public static Surrogate SGT_RDBMS_HOST
public static Surrogate SGT_RDBMS_PORT
public static Surrogate SGT_RDBMS_USER
public static Surrogate SGT_RDBMS_PASSWORD
public static Surrogate SGT_RDBMS_DB_NAME
public static Surrogate SGT_RDBMS_JDBC_CONNECTION_STRING
public static Surrogate SGT_RDBMS_CONNECTION_STRING
public static Surrogate SGT_RDBMS_DSN
public static Keyword KWD_PROTOCOL
public static Keyword KWD_SERVER_TYPE
public static Surrogate SGT_RDBMS_DB_CONNECTION
public static Surrogate SGT_RDBMS_RELATION_DATABASE
public static Symbol SYM_LOGIC_pX
public static Surrogate SGT_RDBMS_RELATION_TABLE_INFO
public static Symbol SYM_STELLA_RELATION
public static Symbol SYM_RDBMS_DBMS_NAME
public static Symbol SYM_STELLA_TABLE_NAME
public static Symbol SYM_RDBMS_COLUMN_LIST
public static Symbol SYM_RDBMS_COLUMN_VECTOR
public static Symbol SYM_RDBMS_COLUMN_INDEX
public static Symbol SYM_RDBMS_ADJUNCT
public static Surrogate SGT_RDBMS_RELATION_COLUMN_INFO
public static Symbol SYM_RDBMS_TABLE_INFO
public static Symbol SYM_RDBMS_COLUMN_NAME
public static Symbol SYM_RDBMS_COLUMN_VARIABLE
public static Symbol SYM_RDBMS_COLUMN_TYPE
public static Symbol SYM_RDBMS_COLUMN_DB_TYPE
public static Symbol SYM_STELLA_MODULE_NAME
public static Symbol SYM_RDBMS_MODULE_REFERENCE
public static Symbol SYM_STELLA_MODULE
public static Symbol SYM_RDBMS_MODULE_LOCALp
public static Symbol SYM_RDBMS_MODULE_REFERENCE_COLUMN
public static Symbol SYM_RDBMS_COERCION_FUNCTION
public static Keyword KWD_UNKNOWN
public static Surrogate SGT_RDBMS_RELATION_TABLE
public static Surrogate SGT_RDBMS_F_GET_RELATION_TABLE_INFO_MEMO_TABLE_000
public static Keyword KWD_STRING_CONSTANT
public static Surrogate SGT_STELLA_NUMBER
public static Surrogate SGT_STELLA_BOOLEAN
public static Keyword KWD_MYSQL
public static Surrogate SGT_STELLA_STRING_WRAPPER
public static Symbol SYM_STELLA_ITERATOR
public static Surrogate SGT_RDBMS_DATABASE
public static Surrogate SGT_RDBMS_F_ALLOCATE_DBTABLE_SPECIALIST_ITERATOR_MEMO_TABLE_000
public static Keyword KWD_FAILURE
public static Keyword KWD_CONTINUING_SUCCESS
public static Keyword KWD_FINAL_SUCCESS
public static Symbol SYM_RDBMS_pREL
public static Symbol SYM_RDBMS_pEV
public static Symbol SYM_RDBMS_pDB
public static Symbol SYM_RDBMS_pARGS
public static Symbol SYM_STELLA_AND
public static Symbol SYM_STELLA_EXISTS
public static Symbol SYM_RDBMS_pDB_TYPE
public static Symbol SYM_RDBMS_INSTANCE_OF
public static Keyword KWD_DONT_OPTIMIZEp
public static Keyword KWD_HOW_MANY
public static Keyword KWD_ALL
public static Keyword KWD_INFERENCE_LEVEL
public static Keyword KWD_ASSERTION
public static Symbol SYM_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_QUERY_000
public static Surrogate SGT_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_MEMO_TABLE_000
public static Symbol SYM_RDBMS_F_GET_QUERY_PATTERN_EVALUATORS_QUERY_001
public static Surrogate SGT_RDBMS_F_SQL_JOIN_MEMO_TABLE_000
public static Keyword KWD_VALUE
public static Keyword KWD_WHITE_SPACE
public static Keyword KWD_SET
public static Keyword KWD_NONE
public static Surrogate SGT_RDBMS_F_SQL_QUERY_MEMO_TABLE_000
public static Keyword KWD_EXTERNAL_DB_UPDATE
public static Surrogate SGT_LOGIC_NAMED_DESCRIPTION
public static Surrogate SGT_STELLA_TRUE
public static Surrogate SGT_STELLA_FALSE
public static Surrogate SGT_STELLA_THING
public static Keyword KWD_EQUIVALENT
public static Keyword KWD_ISA
public static Keyword KWD_PREDICATE
public static Keyword KWD_CLIP
public static Keyword KWD_ASSERT
public static Keyword KWD_RETRACT
public static Keyword KWD_ASSERT_TRUE
public static Keyword KWD_PRESUME_TRUE
public static Keyword KWD_RETRACT_TRUE
public static Keyword KWD_RETRACT_FALSE
public static Keyword KWD_ASSERT_FALSE
public static Keyword KWD_PRESUME_FALSE
public static Keyword KWD_CONCEIVE
public static Symbol SYM_RDBMS_STARTUP_RDBMS
public static Surrogate SGT_STELLA_XML_ELEMENT
public static Surrogate SGT_RDBMS_TASK_ID
public static Surrogate SGT_RDBMS_SUBTASK_ID
public static Surrogate SGT_RDBMS_F_FETCH_EDB_QUERY_MEMO_TABLE_000
public static Surrogate SGT_LOGIC_QUERY_ITERATOR
public static Symbol SYM_RDBMS_STARTUP_FETCH_INTERFACE
public static Symbol SYM_RDBMS_STARTUP_RDBMS_SYSTEM
Constructor Detail |
---|
public RDBMS()
Method Detail |
---|
public static LogicObject defuntable(Cons args)
<columndecl>'s specify the names (and optionally types) of the columns of the database table. They have the same form as a PowerLoom <vardecl>, but column names can be specified with or without question marks. If there is a question mark it will be stripped to determine the column name, otherwise a question mark will be added to generate the relation variable. The optional type specifies the domain of that argument and controls any necessary coercion. The name of each column HAS TO MATCH one of the columns of <tablename>, however, the order is irrelevant and arbitrary projections can be defined by only specifying some subset of <tablename>'s columns.
See deffunction
for legal keyword options.
args
-
public static LogicObject defuntableEvaluatorWrapper(Cons arguments)
public static NamedDescription callDefuntable(Cons arguments)
deftable
command (which see).
Expects the same arguments as deftable
but supplied as a list.
arguments
-
public static LogicObject deftable(Cons args)
See defrelation
for legal keyword options.
args
-
public static LogicObject deftableEvaluatorWrapper(Cons arguments)
public static NamedDescription callDeftable(Cons arguments)
deftable
command (which see).
Expects the same arguments as deftable
but supplied as a list.
arguments
-
public static PropertyList parseOneColumnSpec(Stella_Object columnspec)
public static Cons parseColumnSpecs(Stella_Object relconst, Stella_Object columnspecs, java.lang.Object[] MV_returnarray)
public static LogicObject defdb(Cons args)
SDBCSconnect
(which see for more documentation on
ways to specify a connection). For example, for ODBC a :DSN, an
:ODBC-CONNECTION-STRING or an appropriate combination of :HOST,
:PORT, :USER, :PASSWORD AND :DB-NAME can be used. For JDBC a
:JDBC-CONNECTION-STRING or combination of :HOST, :PORT, etc. can
be used. See defobject
for additional legal keyword options.
args
-
public static LogicObject defdbEvaluatorWrapper(Cons arguments)
public static LogicObject callDefdb(Cons arguments)
defdb
command (which see).
Expects the same arguments as defdb
but supplied as a list.
arguments
-
public static Cons extractRdbmsOptions(Symbol selfname, Cons options, java.lang.Object[] MV_returnarray)
public static void assertRdbmsConnectionInfo(java.lang.String dbInstanceName, Cons options)
dbInstanceName
(for
example, "edb") according to options
. Looks up dbInstanceName
in the module
specified by the :module option (defaults to current module) and retracts any
preexisting connection information. New assertions are also made in that module.
Default values are taken from the configuration table specified by :configuration.
Understands the following options, with default values specified by the configuration key in parentheses: :connection-string ("DBConnection"), :jdbc-connection-string ("JDBCString"), :odbc-connection-string ("ODBCString"), :dsn ("DSN"), :db ("DBName"), :host ("DBHost"), :port ("DBPort"), :user ("DBUser"), :password ("DBPassword"), :module, :configuration.
dbInstanceName
- options
- public static void assertRdbmsConnectionInfoEvaluatorWrapper(Cons arguments)
public static LogicObject defquery(Cons args)
Computed_Procedure
that takes the following
three arguments: the <relconst> query proposition, the database object <dbconst>
and the arguments string. It needs to return an iterator that generates CONS
tuples whose elements will be bound in sequence to <relconst>'s arguments.
See defrelation
for other legal keyword options.
args
-
public static LogicObject defqueryEvaluatorWrapper(Cons arguments)
public static NamedDescription callDefquery(Cons arguments)
defquery
command (which see).
Expects the same arguments as deftable
but supplied as a list.
arguments
-
public static StringWrapper normalizeConnectionArgument(Stella_Object arg)
public static edu.isi.sdbc.Connection connectToDatabase(LogicObject database)
public static void disconnectFromDatabase(LogicObject database)
public static edu.isi.sdbc.Connection getConnectionFromDatabase(LogicObject database)
public static edu.isi.sdbc.Connection getConnectionFromPredicate(Surrogate relationref)
public static Iterator allocateResultSetIterator(edu.isi.sdbc.Connection connection, LogicObject relation, java.lang.String sqlstatement)
public static boolean resultSetIteratorNextP(AllPurposeIterator self)
public static NamedDescription getTableRelation(java.lang.String tableName, Module module)
public static int getTableColumnIndex(NamedDescription tableRelation, java.lang.String columnName, Module module)
public static StringWrapper getTableColumnModuleName(NamedDescription tablerelation, int columnindex)
public static StringWrapper getTableColumnModuleReference(NamedDescription tablerelation, int columnindex)
public static StringWrapper getTableColumnName(NamedDescription tablerelation, int columnindex)
public static Cons getTableColumnNames(NamedDescription tablerelation)
public static RelationTableInfo createRelationTableInfo(NamedDescription relation)
public static RelationTableInfo getRelationTableInfo(NamedDescription tablerelation)
public static boolean collectionValuedConstraintP(Stella_Object argument)
public static Cons collectionValuedConstraintElements(Stella_Object argument)
public static void printSqlValue(OutputStream stream, Stella_Object value, RelationColumnInfo column)
public static void printColumnConstraint(OutputStream sql, RelationColumnInfo column, java.lang.String value, boolean casesensitiveP)
public static void printArgumentConstraint(OutputStream sql, Stella_Object argument, RelationColumnInfo column)
public static void printSqlColumnList(OutputStream stream, RelationTableInfo tableInfo)
public static void printSqlConstraintList(OutputStream stream, RelationTableInfo tableInfo, Vector arguments)
public static java.lang.String createSqlFromProposition(Proposition proposition)
public static Iterator allocateDbtableSpecialistIterator(ControlFrame frame)
public static Keyword retrieveNextDbQuerySolution(ControlFrame frame, Keyword lastmove)
public static Keyword dbtableSpecialist(ControlFrame frame, Keyword lastmove)
public static Cons getQueryPatternEvaluators(Surrogate relationref)
public static Iterator helpMemoizeSqlJoin(Proposition proposition, LogicObject database, Stella_Object arguments)
public static Iterator sqlJoin(Proposition proposition, LogicObject database, Stella_Object arguments)
public static Iterator helpMemoizeSqlQuery(Proposition proposition, LogicObject database, Stella_Object arguments)
public static java.lang.String sqlQueryInstantiateConstraints(java.lang.String sql, KeyValueList bindings)
public static Iterator sqlQuery(Proposition proposition, LogicObject database, Stella_Object arguments)
public static Iterator allocateQuerySpecialistIterator(ControlFrame frame)
public static Keyword querySpecialist(ControlFrame frame, Keyword lastmove)
public static void dbUpdateDemon(Proposition dbproposition)
public static void checkForExternalDbUpdates(Proposition proposition, LogicObject database)
public static Stella_Object getQueryPatternMemoizationKey(Proposition proposition)
public static Cons coerceValues(Cons values, RelationTableInfo table)
public static Stella_Object coerceStringToPowerloomObject(java.lang.String value, NamedDescription type, Module module, boolean localP)
public static int numberStringToInteger(java.lang.String x)
public static java.lang.String coercePowerloomObjectToString(Stella_Object renamed_Object, NamedDescription type)
public static Stella_Object findOrCreateInstance(java.lang.String name, NamedDescription type, Module module, boolean localP)
name
in module
or create one with type
if it does not yet exist. If localP
do not look into any inherited modules.
name
- type
- module
- localP
-
public static Skolem getFunctionAndValueTerms(Proposition proposition, java.lang.Object[] MV_returnarray)
public static Surrogate getPropositionBaseRelationRef(Proposition prop)
public static java.lang.String createSqlAssertionFromProposition(Proposition proposition, Keyword mode)
public static void dbRelationGoesTrue(Proposition proposition)
public static void dbRelationGoesUnknown(Proposition proposition)
public static void dbRelationGoesFalse(Proposition proposition)
public static void dbRelationUpdateDemon(Proposition proposition, Keyword updateMode)
public static Stella_Object runFetchQuery(java.lang.String host, int port, java.lang.String queryId, java.lang.String taskId, java.lang.String subtaskId, java.lang.String database, java.lang.String parameters)
host
- port
- queryId
- taskId
- subtaskId
- database
- parameters
-
public static java.lang.String normalizeFetchQueryArguments(Proposition proposition, Stella_Object arguments, java.lang.Object[] MV_returnarray)
public static Iterator helpMemoizeFetchEdbQuery(Proposition proposition, LogicObject database, Stella_Object arguments)
public static Iterator fetchEdbQuery(Proposition proposition, LogicObject database, Stella_Object arguments)
public static Cons parseFetchXmlAnswer(Cons xmlanswer, NamedDescription relation, Cons outputcolumns)
public static Cons parseOneFetchXmlObject(Cons renamed_Object, NamedDescription relation, Cons outputcolumns)
public static void startFetchEdbGateway(int port)
public static void evaluateFetchQuery(KeyValueList keys, java.io.PrintStream out)
public static Cons buildOneTableAssertion(NamedDescription tableRelation, Cons tuple, Module dbModule)
public static Cons generateTableAssertions(java.lang.String tableName, Cons xmlAnswer, Module module, Module dbModule)
xmlAnswer
from Fetch based on
the database table tableName
and uses it to generate an assertion
for an appropriate relation for inclusion in module
. The database
meta information is found in dbModule
.
tableName
- xmlAnswer
- module
- dbModule
-
public static java.lang.String lookupStringValue(NamedDescription relation, LogicObject instance, Module mod)
public static Cons fetchQueryAssertions(java.lang.String host, int port, LogicObject fetchQuery, java.lang.String taskId, java.lang.String subtaskId, java.lang.String database, java.lang.String parameterValue, Module targetModule, Module dbModule)
fetchQuery
using taskId
; subtaskId
,database
and specifying a single additional parameterValue
. The connection
is made to a remote http query server running on host
port number port
.
Returns a set of assertions for targetModule
using the information in dbModule
to find the appropriate relations.
host
- port
- fetchQuery
- taskId
- subtaskId
- database
- parameterValue
- targetModule
- dbModule
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |