# query

## Description

A query is a request for data or information from a database table or combination of tables.

## Input / Parameters

| No | Name    | Description                                              | Data Type | Required | Example                                    |
| -- | ------- | -------------------------------------------------------- | --------- | -------- | ------------------------------------------ |
| 1  | dataset | Name of the dataset to be read in local table.           | String    | Yes      |                                            |
| 2  | query   | A request for data or information from a database table. | String    | Yes      | <https://www.javatpoint.com/mysql-queries> |

## Output

## Callback

## Video

## Example

The user wants to update the data for table tbl\_sqllite\_customer by using the query.

### Step

1. Create the SQLiteTable in Services and fill the info such as Name and fields. Call the function "insert" for insert data into table before you update.Define the dataset, set the toObject to dt and define code and name.\
   Name: tbl\_sqllite\_customer\
   fields: code and name\
   Dataset: tbl\_sqllite\_customer\
   dt: toObject\
   code: B\
   name: abc\
   name: aaa\
   code: 1111<br>

   ![](/files/su4yRDQU5eiaEexpIoLN)

   ![](/files/N1PMAGveLuXUUl2vg47r)

   ![](/files/xtqV5A9orqLRqHYsn6zI)
2. Call the function "query" for update the data and define the dataset and query.\
   dataset: tbl\_sqllite\_customer\
   query: UPDATE tbl\_sqllite\_customer SET code = 'A1' WHERE code='B'<br>

   ![](/files/ugDRlnpL7ip7IAFa33eh)
3. Call the function "loadData" and define the dataset.\
   dataset: tbl\_sqllite\_customer<br>

   ![](/files/6FYKDHpEMx2s3O0ky95s)

### Result

## Links

### Notes

insert

1. Call the function "insert" and define the dataset and set the function "toObject" to data & define the code and name.\
   ( We assumed you have created the SQLiteTable in Services and fill the info such as Name and fields. )\
   Dataset: tbl\_sqllite\_customer\
   dt: toObject\
   code: B\
   name: abc\
   name: aaa\
   code: 1111<br>

   ![](/files/cFwHFAX7zvbjUwf9kRga)

   ![](/files/wVY1yIR3ERwUiJSa9wZN)
2. Call the function "loadData" and define the dataset.\
   dataset: tbl\_sqllite\_customer<br>

   ![](/files/ohD4anmG44eL2jPjIT6y)

updateby

1. Call the function "updateBy" and define the dataset, by, operator and value.\
   ( We assumed you have created the SQLiteTable in Services and fill the info such as Name and fields. )\
   Dataset: tbl\_sqllite\_customer\
   by: code\
   operator: =\
   value: Code AAA<br>

   ![](/files/XSldvPE7QRDLrORNJOVv)

   ![](/files/Du1BWeqWPa5e9Ux2fYgH)
2. Call the function "loadData" and define the dataset.\
   dataset: tbl\_sqllite\_customer<br>

   ![](/files/h2wQai5ZUoxc2mCHhO4M)

deleteBy

1. Call the function "deleteBy" and define the dataset, by, and value.\
   ( We assumed you have created the SQLiteTable in Services and fill the info such as Name and fields. )\
   Dataset: tbl\_sqllite\_customer\
   by: code\
   value: Code BBB<br>

   ![](/files/64Dc4hcVLqhjwhWlxbXk)
2. Call the function "loadData" and define the dataset.\
   dataset: tbl\_sqllite\_customer<br>

   ![](/files/intuINgWaOZ30haGVRvP)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.emobiq.com/emobiq-client/006-actions-and-visual-logic/action-reference/cordova/dataset/query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
