> For the complete documentation index, see [llms.txt](https://dynamicpixels.gitbook.io/dynamicpixels-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dynamicpixels.gitbook.io/dynamicpixels-docs/cloud-tables.md).

# Cloud Tables

Explore the list of API functions available in TypeScript for managing tables, including detailed descriptions and usage examples.

{% hint style="warning" %}
To use service functions, first ensure that the service is activated before. You can see services by opening "Service Hub" From the game's dashboard header.&#x20;
{% endhint %}

### Find Rows[​](https://docs.dynamicpixels.dev/tables/plugin#find-rows) <a href="#find-rows" id="find-rows"></a>

This function helps to find some rows with specific conditions, if table's permission was set to 'Users rows', you can get only rows that were inserted by current user. Find functions accept some options:

***Skip, Limit:*** Skip and limit help you to implement.

***Sorts:*** This item accepts a dictionary of the field's name and the enum of order.

***Joins:*** This item helps you to join multiple tables with specific conditions. Every Join has these items:

```
new JoinParams{
    TableName = "Another Table ID",
    foreignField = "col name",
    localField = "col name"
}
```

***Conditions:*** This item helps to get specific rows, conditions have two types, Single and Combiners.

* ***Single:*** These conditions apply a logic to queries:

```
new Eq("player_ startid", 20).ToQuery(),
```

* ***Combiners:*** And-Or conditions give the ability to combine multiple conditions.

```
new And(
    new Eq("player_id", 20),
    new Eq("status", 1)
).ToQuery(),
```

```typescript
DynamicPixels.Table.Find(input: FindParams): Promise<object[]>;
```

### Find Row By ID[​](https://docs.dynamicpixels.dev/tables/plugin#find-row-by-id) <a href="#find-row-by-id" id="find-row-by-id"></a>

This function return a row with specific id, if table's permission was set to 'Users rows', you can get only rows that were inserted by current user.

```typescript
DynamicPixels.Table.FindById(input: FindByIdParams): Promise<object>;
```

### Find Row By ID Then Delete[​](https://docs.dynamicpixels.dev/tables/plugin#find-row-by-id-then-delete) <a href="#find-row-by-id-then-delete" id="find-row-by-id-then-delete"></a>

This function deletes a row with specific id and will return the last values of it, if table's permission was set to 'Users rows', you can get only rows that were inserted by current user.

```typescript
DynamicPixels.Table.FindByIdAndDelete(input: FindByIdAndDeleteParams): Promise<object>;
```

### Find Row By ID Then Update[​](https://docs.dynamicpixels.dev/tables/plugin#find-row-by-id-then-update) <a href="#find-row-by-id-then-update" id="find-row-by-id-then-update"></a>

This function update a row with specific id and will return the last values of it, if table's permission was set to 'Users rows', you can get only rows that were inserted by the current user.

```typescript
DynamicPixels.Table.FindByIdAndUpdate(input: FindByIdAndUpdateParams): Promise<object>;
```

### Insert New Row[​](https://docs.dynamicpixels.dev/tables/plugin#insert-new-row) <a href="#insert-new-row" id="insert-new-row"></a>

This function inserts a new row with passed data and return new created row.

```typescript
DynamicPixels.Table.Insert(input: InsertParams): Promise<object>;
```

### Insert Many Rows[​](https://docs.dynamicpixels.dev/tables/plugin#insert-many-rows) <a href="#insert-many-rows" id="insert-many-rows"></a>

This function inserts multiple rows with passed data and returns new created rows.

```typescript
DynamicPixels.Table.InsertMany(input: InsertManyParams): void;
```

### Update many Rows[​](https://docs.dynamicpixels.dev/tables/plugin#update-many-rows) <a href="#update-many-rows" id="update-many-rows"></a>

You can update multiple rows with specific conditions with this function.

```typescript
DynamicPixels.Table.UpdateMany(input: UpdateManyParams): void;
```

### Delete Row By ID[​](https://docs.dynamicpixels.dev/tables/plugin#delete-row-by-id) <a href="#delete-row-by-id" id="delete-row-by-id"></a>

This function deletes a row with a specific id

```typescript
DynamicPixels.Table.Delete(input: DeleteParams): Promise<object>;
```

### Delete Many Rows[​](https://docs.dynamicpixels.dev/tables/plugin#delete-many-rows) <a href="#delete-many-rows" id="delete-many-rows"></a>

This function deletes multiple rows with specific ids

```typescript
DynamicPixels.Table.DeleteMany(input: DeleteManyParams): void;
```
