public class SQL extends MBScriptableObject
myLogger
Constructor and Description |
---|
SQL() |
Modifier and Type | Method and Description |
---|---|
void |
jsConstructor(java.lang.String theName)
Create a new SQL JavaScript object, with the given name.
|
java.lang.String |
jsFunction_escape(java.lang.String theSql)
Pass string to have us escape for use querying the db
|
void |
jsFunction_query(java.lang.String theSql,
org.mozilla.javascript.Function theMapperFunction)
Run the given query and run the given function on each row returned by the query.
|
java.lang.String |
jsFunction_queryForBase64(java.lang.String theSql)
Runs the specified SQL query.
|
byte[] |
jsFunction_queryForByteArray(java.lang.String theSql)
Runs the specified SQL queue.
|
java.lang.Integer |
jsFunction_queryForInteger(java.lang.String theSql)
Runs the specified SQL queue.
|
java.lang.String[] |
jsFunction_queryForList(java.lang.String theSql)
Deprecated.
Use
SQL.jsFunction_query(String, Function) instead. |
org.mozilla.javascript.ScriptableObject[] |
jsFunction_queryForMap(java.lang.String theSql)
Deprecated.
Use
SQL.jsFunction_query(String, Function) instead. |
java.lang.String |
jsFunction_queryForString(java.lang.String theSql)
Runs the specified SQL queue.
|
void |
jsFunction_setExternalDatabaseXML(ExternalDatabaseInformation theInformation)
Changes the connection properties of this SQL object to connect to an external database instead of the
MediaBeacon database.
|
java.lang.Integer |
jsFunction_update(java.lang.String theSql)
Run a single SQL update operation (such as an insert, update or delete statement).
|
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkPropertyChange, checkPropertyDefinition, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureSymbolScriptable, equivalentValues, get, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, has, hasInstance, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, preventExtensions, put, put, put, putConst, putConstProperty, putProperty, putProperty, putProperty, redefineProperty, sameValue, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, size
public void jsConstructor(java.lang.String theName)
theName
- The name that will be used when logging operations performed on this object.public void jsFunction_setExternalDatabaseXML(ExternalDatabaseInformation theInformation)
theInformation
- An ExternalDatabaseInformation object to use when connecting to the external DB. The
constructor for for ExternalDatabaseInformation takes 3 parameters: connection string,
user name, and password. Should be called like
"ExternalDatabaseInformation('aConnectionString', 'aUsername', 'aPassword');"public java.lang.String jsFunction_escape(java.lang.String theSql)
theSql
- to escapepublic java.lang.String jsFunction_queryForString(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.Integer jsFunction_queryForInteger(java.lang.String theSql)
theSql
- the SQL queue.@Deprecated public java.lang.String[] jsFunction_queryForList(java.lang.String theSql)
SQL.jsFunction_query(String, Function)
instead.theSql
- the SQL queue.@Deprecated public org.mozilla.javascript.ScriptableObject[] jsFunction_queryForMap(java.lang.String theSql)
SQL.jsFunction_query(String, Function)
instead.theSql
- the SQL queue.public byte[] jsFunction_queryForByteArray(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.String jsFunction_queryForBase64(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.Integer jsFunction_update(java.lang.String theSql)
theSql
- the SQL queue to run.public void jsFunction_query(java.lang.String theSql, org.mozilla.javascript.Function theMapperFunction)
theSql
- the SQL query to runtheMapperFunction
- the mapper function to runCopyright © 2023 MediaBeacon, Inc. All Rights Reserved.