Cloud Tables
API References for Cloud Data Storage Service
Explore the list of API functions available in Unity for managing tables, including detailed descriptions and usage examples.
To use services functions, first ensure that the service is activated before. You can see services by opening "Service Hub" From game's dashboard header.
Find Rows
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 help you to join multiple table with specific conditions. Every Join have 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: This conditions apply a logic to queries:
new Eq("player_ startid", 20).ToQuery(),
Combiners: And-Or conditions give ability of combining of multiple conditions.
new And(
new Eq("player_id", 20),
new Eq("status", 1)
).ToQuery(),
DynamicPixels.Table.Find<Person, FindParams>(new FindParams {
tableId = "Table Unique ID",
options = new FindOptions
{
Skip = 0,
Limit = 25,
Conditions = new Eq("playerid",20).ToQuery(),
Sorts = new Dictionary<string, Order>(),
Joins = new List<JoinParams>(new[] {}),
}
}));
Find Row By ID
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.
DynamicPixels.Table.FindById<T>(new FindByIdParams{
RowId = rowId,
TableId = tableId
});
Find Row By ID Then Delete
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.
DynamicPixels.Table.FindByIdAndDelete<T>(new FindByIdAndDeleteParams{
RowId = rowId,
TableId = tableId
});
Find Row By ID Then Update
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 current user.
DynamicPixels.Table.FindByIdAndUpdate<T>(new FindByIdAndUpdateParams{
RowId = rowId,
TableId = tableId
Data = {}
});
Insert New Row
This function inserts a new row with passed data and return new created row.
DynamicPixels.Table.Insert<T>(new InsertParams{
TableId = tableId,
Data = new Class
{
key = value
}
});
Insert Many Rows
This function inserts multiple rows with passed data and returns new created rows.
DynamicPixels.Table.InsertMany<T>(new InsertManyParams{
TableId = tableId,
Data = [new Class
{
key = value
}]
});
Update many Rows
You can update multiple rows with specific condition with this function.
DynamicPixels.Table.UpdateMany(new UpdateManyParams());
Delete Row By ID
This function deletes a row with an specific id
DynamicPixels.Table.Delete(new DeleteParams());
Delete Many Rows
This function deletes multiple rows with specific ids
DynamicPixels.Table.DeleteMany(new DeleteManyParams());
Last updated