Class: AdhocQuery

message.AdhocQuery(bucket, q, eager, hinted, start, count, sort)

new AdhocQuery(bucket, q, eager, hinted, start, count, sort)

Executes a basic ad-hoc query
Executes the given query and returns a list of matching objects.

Parameters:
Name Type Description
bucket string

The bucket name

q string

The query

eager boolean

indicates if the query result should be sent back as ids or as objects

hinted boolean

indicates whether the query should be cached even when capacity limit is reached

start number

The offset to start from

count number

The number of objects to list

sort string

The sort object

Source:

Extends

Members

progressCallback :connector.Message~progressCallback

Type:
Inherited From:
Source:

spec :Object

The message specification

Type:
  • Object
Inherited From:
Source:

tokenStorage :util.TokenStorage

Type:
Inherited From:
Source:

withCredentials :boolean

Type:
  • boolean
Inherited From:
Source:

Methods

accept() → {string}

Gets the request accept header

Overrides:
Source:
Returns:

This message object

Type
string

acl() → {string}

Gets the ACL of a file into the Baqend-Acl header

Overrides:
Source:
Returns:

This message object

Type
string

addQueryString(query) → {this}

Adds the given string to the request path

If the parameter is an object, it will be serialized as a query string.

Parameters:
Name Type Description
query string | Object.<string, string>

which will added to the request path

Inherited From:
Source:
Returns:
Type
this

cacheControl() → {string}

Gets the cache control header

Overrides:
Source:
Returns:
Type
string

contentLength() → {number}

Gets the contentLength

Overrides:
Source:
Returns:
Type
number

customHeaders() → {string}

Gets and encodes the custom headers of a file into the Baqend-Custom-Headers header

Overrides:
Source:
Returns:

This message object

Type
string

doReceive(response) → {void}

Handle the receive

Parameters:
Name Type Description
response Object

The received response headers and data

Inherited From:
Source:
Returns:
Type
void

entity(data, typeopt) → {this}

Sets the entity type

Parameters:
Name Type Attributes Default Description
data *

The data to send

type EntityType <optional>
"json"

the type of the data one of 'json'|'text'|'blob'|'arraybuffer' defaults to 'json'

Inherited From:
Source:
Returns:

This message object

Type
this

Gets the value of a the specified request header

Parameters:
Name Type Description
name string

The header name

Overrides:
Source:
Returns:

The header value

Type
string

ifMatch() → {string}

Gets the request conditional If-Match header

Overrides:
Source:
Returns:

This message object

Type
string

ifNoneMatch() → {string}

Gets the request a ETag based conditional header

Overrides:
Source:
Returns:
Type
string

ifUnmodifiedSince() → {string}

Gets the request date based conditional header

Overrides:
Source:
Returns:

This message object

Type
string

mimeType() → {string}

Get the mimeType

Overrides:
Source:
Returns:

This message object

Type
string

noCache() → {this}

Indicates that the request should not be served by a local cache

Inherited From:
Source:
Returns:
Type
this

progress() → {connector.Message~progressCallback}

Gets the progress callback

Overrides:
Source:
Returns:

The callback set

Type
connector.Message~progressCallback

responseType() → {string}

Gets the response type which should be returned

Overrides:
Source:
Returns:

This message object

Type
string