BiodbSqlQuery: This class handles an SQL Query.

BiodbSqlQueryR Documentation

This class handles an SQL Query.

Description

This class handles an SQL Query.

This class handles an SQL Query.

Details

This class represents an SQL query. It is used internally to generate an SQL query string.

Methods

Public methods


Method new()

Initializer.

Usage
BiodbSqlQuery$new()
Returns

Nothing.


Method setTable()

Set the table.

Usage
BiodbSqlQuery$setTable(table)
Arguments
table

The table name.

Returns

Nothing.


Method addField()

Set the fields.

Usage
BiodbSqlQuery$addField(table = NULL, field)
Arguments
table

The table name.

field

A field name.

Returns

Nothing.


Method setDistinct()

Set or unset distinct modifier.

Usage
BiodbSqlQuery$setDistinct(distinct)
Arguments
distinct

Either TRUE or FALSE for setting or unsetting the distinct flag.

Returns

Nothing.


Method setLimit()

Set results limit.

Usage
BiodbSqlQuery$setLimit(limit)
Arguments
limit

The limit to set, as an integer value.

Returns

Nothing.


Method addJoin()

Add a join.

Usage
BiodbSqlQuery$addJoin(table1, field1, table2, field2)
Arguments
table1

The first table.

field1

The field of the first table.

table2

The second table.

field2

The field of the second table.

Returns

Nothing.


Method setWhere()

Set the where clause.

Usage
BiodbSqlQuery$setWhere(expr)
Arguments
expr

A BiodbSqlExpr representing the "where" clause.

Returns

Nothing.


Method getJoin()

Builds and returns the join expression.

Usage
BiodbSqlQuery$getJoin()
Returns

A character vector representing the join expression.


Method getWhere()

Gets the where expression.

Usage
BiodbSqlQuery$getWhere()
Returns

The BiodbSqlExpr instance representing the "where" clause.


Method getFields()

Gets the fields to retrieve.

Usage
BiodbSqlQuery$getFields()
Returns

A string containing the list of fields to retrieve.


Method toString()

Generates the string representation of this query.

Usage
BiodbSqlQuery$toString()
Returns

A string containing the full SQL query.


Method clone()

The objects of this class are cloneable with this method.

Usage
BiodbSqlQuery$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

BiodbRequestScheduler, BiodbRequest.


pkrog/biodb documentation built on Nov. 29, 2022, 4:24 a.m.