Connectors Reference

Xooa Blockchain Database

Xooa makes it easy to use blockchain by eliminating common barriers. By gaining an enterprise blockchain platform, you can start leveraging the capabilities of blockchain almost instantly. The Xooa Ledger Database (XLDB) allows you to use blockchain like a simple database. Storing, retrieving, and querying entries without needing to write a smart contract. All you need is a Xooa account. This connector completes the picture by providing access to this database. The current state of a given entry is represented by the World State (a NoSQL database). Because blockchain is append only, the transactions that led to the current state of the entry are stored in the ledger. An entry must take the form of key-value pair where the key uniquely identifies the entry and value can take the form of a JSON object.

 

Status: Preview

Tier: Premium

Version: 1.0

 

Actions:

Name

Summary

Create ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

Create an entry in the database

CreateUpdate ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

Create or Update a document

Update ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

Updates a document

Get (string keys, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

Get the states of entries

History (string key, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

History for a key

Query ([Optional]string selector, [Optional]string fields, [advanced][Optional]integer limit, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

Query based on selection criteria

Delete (string keys, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

Deletes an entry

 

Triggers:

Name

Summary

 

Objects:

Name

Summary

UpdateResponse

 

 

Actions:

Create

Summary: Create an entry in the database

Description: Create a key-value entry. Function will fail if the key already exists. If you want to update an entry (the key exists), use Update; if you want to create or update use CreateUpdate.

 

Syntax:

XooaBlockchainDatabase.Create ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

 

Parameters:

Name

Type

Summary

Required

Related Action

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

body

array of (string)

 

 

True

 

Returns:

 

CreateUpdate

Summary: Create or Update a document

Description: If the key does not already exist, creates a new key-value entry, else updates the value of an existing entry.

 

Syntax:

XooaBlockchainDatabase.CreateUpdate ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

 

Parameters:

Name

Type

Summary

Required

Related Action

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

body

array of (string)

 

 

True

 

Returns:

          Type:string

 

Update

Summary: Updates a document

Description: Updates an entry with agiven key. If an existing entry is not found, the request fails.

 

Syntax:

XooaBlockchainDatabase.Update ([advanced][Optional]boolean async, [advanced][Optional]integer timeout, array body)

 

Parameters:

Name

Type

Summary

Required

Related Action

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

body

array of (string)

 

 

True

 

Returns:

          Type:UpdateResponse

 

Get

Summary: Get the states of entries

Description: Gives the current state of a given list of entries

 

Syntax:

XooaBlockchainDatabase.Get (string keys, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

keys

string

(Keys of the requested entries.)

Comma separated list of keys.

True

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

 

Returns:

          Type:string

 

History

Summary: History for a key

Description: Get the transaction history for an entry specified by the given key. Can be used to find deleted entries (through their transaction history).

 

Syntax:

XooaBlockchainDatabase.History (string key, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

key

string

(The entry’s key.)

The key of the entry for which transaction history is required.

True

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

 

Returns:

          Type:string

 

Query

Summary: Query based on selection criteria

Description: Query the database and return entries matching the selection criteria given by the selector.

 

Syntax:

XooaBlockchainDatabase.Query ([Optional]string selector, [Optional]string fields, [advanced][Optional]integer limit, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

selector

string

(Selection criteria for querying.)

This is the criteria for querying the values of entries. For example: {'Make.Model':'3', 'Cost':{'$gt':150}}

False

fields

string

(List of fields.)

List of fields that need to be returned. If empty, all fields for a given entry will be retrieved.

False

limit

integer

(Maximum number of entries.)

Maximum number of entries that can be retrieved.

False

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

 

Returns:

          Type:string

 

Delete

Summary: Deletes an entry

Description: Creates a transaction to delete an entry with agiven key. The entry’s state no longer appears but the transactions that have updated the entry, including a transaction for the deletion is always kept and never deleted from the ledger.

 

Syntax:

XooaBlockchainDatabase.Delete (string keys, [advanced][Optional]boolean async, [advanced][Optional]integer timeout)

 

Parameters:

Name

Type

Summary

Required

Related Action

keys

string

(List of keys.)

Comma separated list of all the keys or entries to be marked as deleted.

True

async

boolean

(Asynchronous call indicator)

Specifies whether to perform the call asynchronously (default is false).

False

timeout

integer

(Timeout (synchronous calls only))

Timeout waiting on a response from a synchronous call (async false).A 202 Pending Transaction Response with the URL to retrieve appears if the timeout value is exceeded. Default timeout value is 5000ms.

False

 

Returns:

          Type:string

 


 

UpdateResponse

Summary:

Description:

 

          Properties:

Name

Type

Summary