- Source:
Methods
count(options) → {Promise.<number>}
Counts the number of results that will be returned.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | as specified in the Angular documentation |
- Source:
Returns:
the number results to be returned (deferred)
- Type
- Promise.<number>
count(timeout) → {Promise.<number>}
Counts the number of results that will be returned.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
Promise | if resolved the request will be cancelled |
- Source:
Returns:
the number results to be returned (deferred)
- Type
- Promise.<number>
count() → {Promise.<number>}
Counts the number of results that will be returned.
- Source:
Returns:
the number results to be returned (deferred)
- Type
- Promise.<number>
limit(offset, count) → {IcatQueryBuilder}
Adds in a limit clause to the JPQL expression
Parameters:
Name | Type | Description |
---|---|---|
offset |
string | the number of entities you want to skip |
count |
string | the max number entities you want returned |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
limit(count) → {IcatQueryBuilder}
Adds in a limit clause to the JPQL expression
Parameters:
Name | Type | Description |
---|---|---|
count |
string | the max number entities you want returned |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
orderBy(fieldName, direction) → {IcatQueryBuilder}
Orders the results to be returned by a field name.
Parameters:
Name | Type | Description |
---|---|---|
fieldName |
string | the field name which you wish to order by |
direction |
string | can be either 'asc' (ascending) or 'desc' (descending) |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
orderBy(fieldName) → {IcatQueryBuilder}
Orders the results to be returned by a field name in ascending order.
Parameters:
Name | Type | Description |
---|---|---|
fieldName |
string | the field name which you wish to order by |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
run(options) → {Promise.<Array.<IcatEntity>>}
Runs the query on the Icat server.
Parameters:
Name | Type | Description |
---|---|---|
options |
object | as specified in the Angular documentation |
- Source:
Returns:
a deferred array of icat entities
- Type
- Promise.<Array.<IcatEntity>>
run(timeout) → {Promise.<Array.<IcatEntity>>}
Runs the query on the Icat server.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
Promise | if resolved the request will be cancelled |
- Source:
Returns:
a deferred array of icat entities
- Type
- Promise.<Array.<IcatEntity>>
run() → {Promise.<Array.<IcatEntity>>}
Runs the query on the Icat server.
- Source:
Returns:
a deferred array of icat entities
- Type
- Promise.<Array.<IcatEntity>>
where(expression) → {IcatQueryBuilder}
Adds in a where clause.
Parameters:
Name | Type | Description |
---|---|---|
expression |
array |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
Example
var investigationId = 3;
tc.icat('LILS').queryBuilder('datafile').where(["investigation.id = ?", investigationId]).run().log()
where(expression) → {IcatQueryBuilder}
Adds in a where clause.
Parameters:
Name | Type | Description |
---|---|---|
expression |
string |
- Source:
Returns:
the current IcatQueryBuilder object to allow for chaining
- Type
- IcatQueryBuilder
Example
tc.icat('LILS').queryBuilder('datafile').where("investigation.id = 3").run().log()