public class SQL extends MBScriptableObject
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 |
(JavaScript Function) escape(java.lang.String theSql)
Pass string to have us escape for use querying the db
|
void |
(JavaScript Function) 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 |
(JavaScript Function) queryForBase64(java.lang.String theSql)
Runs the specified SQL query.
|
byte[] |
(JavaScript Function) queryForByteArray(java.lang.String theSql)
Runs the specified SQL queue.
|
java.lang.Integer |
(JavaScript Function) queryForInteger(java.lang.String theSql)
Runs the specified SQL queue.
|
java.lang.String[] |
(JavaScript Function) queryForList(java.lang.String theSql)
Deprecated.
|
org.mozilla.javascript.ScriptableObject[] |
(JavaScript Function) queryForMap(java.lang.String theSql)
Deprecated.
|
java.lang.String |
(JavaScript Function) queryForString(java.lang.String theSql)
Runs the specified SQL queue.
|
void |
(JavaScript Function) 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 |
(JavaScript Function) update(java.lang.String theSql)
Run a single SQL update operation (such as an insert, update or delete statement).
|
associateValue, avoidObjectDetection, callMethod, callMethod, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, get, get, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassName, getClassPrototype, getDefaultValue, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, has, has, hasInstance, hasProperty, hasProperty, isConst, isEmpty, isExtensible, isSealed, preventExtensions, put, put, putConst, putConstProperty, putProperty, putProperty, redefineProperty, sealObject, 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 (JavaScript Function) 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 (JavaScript Function) escape(java.lang.String theSql)
theSql
- to escapepublic java.lang.String (JavaScript Function) queryForString(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.Integer (JavaScript Function) queryForInteger(java.lang.String theSql)
theSql
- the SQL queue.@Deprecated public java.lang.String[] (JavaScript Function) queryForList(java.lang.String theSql)
theSql
- the SQL queue.@Deprecated public org.mozilla.javascript.ScriptableObject[] (JavaScript Function) queryForMap(java.lang.String theSql)
theSql
- the SQL queue.public byte[] (JavaScript Function) queryForByteArray(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.String (JavaScript Function) queryForBase64(java.lang.String theSql)
theSql
- the SQL queue.public java.lang.Integer (JavaScript Function) update(java.lang.String theSql)
theSql
- the SQL queue to run.public void (JavaScript Function) query(java.lang.String theSql, org.mozilla.javascript.Function theMapperFunction)
theSql
- the SQL query to runtheMapperFunction
- the mapper function to runCopyright © 2017 MediaBeacon, Inc. All Rights Reserved.