You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-9Lines changed: 14 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
A Python package allowing developers to connect to Dataverse environments for DDL / DML operations.
4
4
5
5
- Read (SQL) — Execute constrained read-only SQL via the Dataverse Web API `?sql=` parameter. Returns `list[dict]`.
6
-
- OData CRUD — Unified methods `create(logical_name, record|records)`, `update(logical_name, id|ids, patch|patches)`, `delete(logical_name, id|ids)` plus `get` with record id or filters.
6
+
- OData CRUD — Unified methods `create(logical_name, record|records)`, `update(logical_name, id|ids, patch|patches)`, `delete(logical_name, id|ids)` plus `get` with record id or filters and `delete_async` for better multi-record delete performance.
7
7
- Bulk create — Pass a list of records to `create(...)` to invoke the bound `CreateMultiple` action; returns `list[str]` of GUIDs. If any payload omits `@odata.type` the SDK resolves and stamps it (cached).
8
8
- Bulk update — Provide a list of IDs with a single patch (broadcast) or a list of per‑record patches to `update(...)`; internally uses the bound `UpdateMultiple` action; returns nothing. Each record must include the primary key attribute when sent to UpdateMultiple.
9
9
- Retrieve multiple (paging) — Generator-based `get(...)` that yields pages, supports `$top` and Prefer: `odata.maxpagesize` (`page_size`).
@@ -39,7 +39,9 @@ Auth:
39
39
|`update`|`update(logical_name, list[id], patch)`|`None`| Broadcast; same patch applied to all IDs (UpdateMultiple). |
40
40
|`update`|`update(logical_name, list[id], list[patch])`|`None`| 1:1 patches; lengths must match (UpdateMultiple). |
41
41
|`delete`|`delete(logical_name, id)`|`None`| Delete one record. |
42
-
|`delete`|`delete(logical_name, list[id], use_bulk_delete=True)`|`Optional[str]`| Delete many with async BulkDelete or sequential single-record delete. |
42
+
|`delete`|`delete(logical_name, list[id])`|`None`| Sequential deletes (loops over single-record delete). |
|`query_sql`|`query_sql(sql)`|`list[dict]`| Constrained read-only SELECT via `?sql=`. |
44
46
|`create_table`|`create_table(tablename, schema, solution_unique_name=None)`|`dict`| Creates custom table + columns. Friendly name (e.g. `SampleItem`) becomes schema `new_SampleItem`; explicit schema name (contains `_`) used as-is. Pass `solution_unique_name` to attach the table to a specific solution instead of the default solution. |
45
47
|`create_column`|`create_column(tablename, columns)`|`list[str]`| Adds columns using a `{name: type}` mapping (same shape as `create_table` schema). Returns schema names for the created columns. |
@@ -54,10 +56,10 @@ Auth:
54
56
55
57
Guidelines:
56
58
-`create` always returns a list of GUIDs (1 for single, N for bulk).
57
-
-`update` always returns `None`.
59
+
-`update`and `delete`always returns `None`.
58
60
- Bulk update chooses broadcast vs per-record by the type of `changes` (dict vs list).
59
-
-`delete` returns `None` for single-record delete and sequential multi-record delete, and the BulkDelete async job ID for multi-record BulkDelete.
60
-
-BulkDelete doesn't wait for the delete job to complete. It returns once the async delete job is scheduled.
61
+
-`delete_async` returns the BulkDelete async job ID and doesn't wait for completion.
62
+
-It's recommended to use delete_async for multi-record delete for better performance.
61
63
- Paging and SQL operations never mutate inputs.
62
64
- Metadata lookups for logical name stamping cached per entity set (in-memory).
0 commit comments