SQL Yoga version 1.1.0 build 4 :: Visit website

Printer friendly version

function sqlquery_get()

Retrieves properties of a SQL Query Object array.

function sqlquery_get @pQueryA, pProp
Simple parameter. @pQueryA A SQL Query Object array as created using sqlquery_createObject().
Simple parameter. pProp The property to get.


column delimiter: When retrieving a query as data or converting a query cursor to data the column delimiter is used. Default is TAB.

column names length: Allows you to explicitly select just column name (short), the table and column name (full) or the default behavior.

conditions: A string representing the search conditions for the SQL query. You can use english or SQL operators. You can also use binding. A condition using english operators would look something like this: lesson.name contains :1 AND lesson.description contains :2 If you are using binding then pass in the binding values as parameters 4 - n, where n = the number of binding variables you use in your conditions string. Support english operators are: IS, IS NOT, IS GREATER THAN, IS GREATER THAN OR EQUAL TO, IS LESS THAN, IS LESS THAN OR EQUAL TO, IS IN, IS NOT IN, CONTAINS, DOES NOT CONTAIN, BEGINS WITH, ENDS WITH, DOES NOT BEGIN WITH, DOES NOT END WITH

condition bindings: A numerically indexed array. The value of [1] will be used to replace :1 in the conditions, [2] for :2, and so on.

connection: Name of connection to use when querying database.

cursor id: The id of the RevDB cursor associated with the SQL Query object. This only returns a positive value if you use sqlquery_retrieve.

database type: The type of database that the object's connection points to.

distinct: Returns true/false. True means SQL query returns DISTINCT results.

find: Can be set to "first" to only return the first record found.

from clause: The FROM clause of the query.

full column names [deprecated - see column names length]: Returns true if the query will include both the table name and field name in the column name of query results. This only applies when SQL Yoga is automatically generating the SELECT clause.

group by: Determines how returned rows are grouped.

having: Used to filter the rows returned using group by.

join clause: The JOIN clause of the query.

number of records: The number of records in the object's cursor. A cursor is opened using sqlquery_retrieve.

limit: The number of rows to limit the result to. Useful for large record sets of which you only want a certain number. Default is empty.

offset: The number of rows to skip when returning the results. Setting this to 21 would skip records 1 to 20. Default is empty.

order by: Fields to sort records by.

query: The full SELECT query for the object. This query is used when opening a cursor or retrieving data.

query is at end: Returns true if the object's cursor is at the end of available records. A cursor is opened using sqlquery_retrieve.

query is at start: Returns true if the object's cursor is at the beginning of available records. A cursor is opened using sqlquery_retrieve.

[related table] joins: The related tables to include in the results. If you have defined Table Objects and Relationship Objects then you can simply pass in a string like "LEFT JOIN related_table_name". The string will be parsed and the ON portion of the JOIN will be included. If you have not defined Relationship Objects for your Table Objects then you must pass in the full join string, i.e. "JOIN related_table_name ON field = field".

row delimiter: When retrieving a query as data or converting a query cursor to data the row delimiter is used. Default is CR.

select clause: Returns the fields to retrieve from the database.

sort by: alias for 'order by'.

table: The name of the primary table for the SQL Query Object.

table as: The alias to use for the table in the query.

tables: A line delimited list of all tables in the query.

where clause: The WHERE clause of the query.