EmbeddedSQLExpression
EmbeddedSQLExpression[string]
represents an SQL expression to be evaluated verbatim within an EntityFunction object.
EmbeddedSQLExpression[template,args]
represents an SQL expression string template with arguments provided by args.
Details
- EmbeddedSQLExpression can be used to embed literal SQL expressions within an EntityFunction.
- In the form EmbeddedSQLExpression[template,args], args can either be a list or an association with string keys. If it is a list, the template slots in template are taken to be positional. If args is an association, the slots in template are taken to be named. The syntax for template is the same as the one used in StringTemplate.
- In EmbeddedSQLExpression[template,args], the values in args can take the following forms:
-
n,"string",DateObject[…],… literal values a+b,Sin[x],… compilable expressions x["prop"] properties bound to the surrounding EntityFunction EntityValue[…],EntityClass[…],… full symbolic queries - EmbeddedSQLExpression[template][arg1,arg2,…] is equivalent to EmbeddedSQLExpression[template,{arg1,arg2,…}].
- EmbeddedSQLExpression[template][association] is equivalent to EmbeddedSQLExpression[template,association].
Examples
Basic Examples (1)
Register a RelationalDatabase-backed EntityStore:
EmbeddedSQLExpression can be used to evaluate any SQL expression:
Use the second argument to bind literal values:
Text
Wolfram Research (2020), EmbeddedSQLExpression, Wolfram Language function, https://reference.wolfram.com/language/ref/EmbeddedSQLExpression.html.
CMS
Wolfram Language. 2020. "EmbeddedSQLExpression." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/EmbeddedSQLExpression.html.
APA
Wolfram Language. (2020). EmbeddedSQLExpression. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/EmbeddedSQLExpression.html