Skip to content

Commit 090dc6e

Browse files
committed
Update readme
1 parent d7f9326 commit 090dc6e

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ Auth:
4242
| `delete` | `delete(logical_name, list[id], use_bulk_delete=True)` | `Optional[str]` | Delete many with async BulkDelete or sequential single-record delete. |
4343
| `query_sql` | `query_sql(sql)` | `list[dict]` | Constrained read-only SELECT via `?sql=`. |
4444
| `create_table` | `create_table(logical_name, schema, solution_unique_name=None)` | `dict` | Creates custom table + columns. Requires logical name with publisher prefix (e.g. `new_sampleitem`) and column names with same prefix (e.g. `{"new_code": "string"}`). Pass `solution_unique_name` to attach the table to a specific solution instead of the default solution. |
45-
| `create_column` | `create_column(tablename, columns)` | `list[str]` | Adds columns using a `{name: type}` mapping with publisher prefix (e.g. `{"new_category": "string"}`). Returns schema names for the created columns. |
46-
| `get_table_info` | `get_table_info(schema_name)` | `dict | None` | Basic table metadata by schema name (e.g. `new_SampleItem`). Friendly names not auto-converted. |
47-
| `list_tables` | `list_tables()` | `list[dict]` | Lists non-private tables. |
48-
| `delete_table` | `delete_table(tablename)` | `None` | Drops custom table. Accepts friendly or schema name; friendly converted to `new_<PascalCase>`. |
49-
| `delete_column` | `delete_column(tablename, columns)` | `list[str]` | Deletes one or more columns; returns schema names (accepts string or list[str]). |
45+
| `create_columns` | `create_columns(logical_name, columns)` | `list[str]` | Adds columns using a `{name: type}` mapping with publisher prefix (e.g. `{"new_category": "string"}`). Returns logical names for the created columns. |
46+
| `get_table_info` | `get_table_info(logical_name)` | `dict | None` | Basic table metadata by logical name (e.g. `new_sampleitem`). Lookup is case-insensitive. |
47+
| `list_tables` | `list_tables()` | `list[str]` | Lists custom table logical names. |
48+
| `delete_table` | `delete_table(logical_name)` | `None` | Drops custom table by logical name with publisher prefix (e.g. `new_sampleitem`). |
49+
| `delete_columns` | `delete_columns(logical_name, columns)` | `list[str]` | Deletes one or more columns; returns logical names (accepts string or list[str]). |
5050
| `PandasODataClient.create_df` | `create_df(logical_name, series)` | `str` | Create one record (returns GUID). |
5151
| `PandasODataClient.update` | `update(logical_name, id, series)` | `None` | Returns None; ignored if Series empty. |
5252
| `PandasODataClient.get_ids` | `get_ids(logical_name, ids, select=None)` | `DataFrame` | One row per ID (errors inline). |
@@ -301,21 +301,21 @@ class Status(IntEnum):
301301

302302
# Create a simple custom table and a few columns
303303
info = client.create_table(
304-
"SampleItem", # friendly name; defaults to SchemaName new_SampleItem
304+
"new_sampleitem", # logical name with publisher prefix (e.g., "new_")
305305
{
306-
"code": "string",
307-
"count": "int",
308-
"amount": "decimal",
309-
"when": "datetime",
310-
"active": "bool",
311-
"status": Status,
306+
"new_code": "string",
307+
"new_count": "int",
308+
"new_amount": "decimal",
309+
"new_when": "datetime",
310+
"new_active": "bool",
311+
"new_status": Status,
312312
},
313313
solution_unique_name="my_solution_unique_name", # optional: associate table with this solution
314314
)
315315

316316
# Create or delete columns
317-
client.create_column("SampleItem", {"category": "string"}) # returns ["new_Category"]
318-
client.delete_column("SampleItem", "category") # returns ["new_Category"]
317+
client.create_columns("new_sampleitem", {"new_category": "string"}) # returns ["new_category"]
318+
client.delete_columns("new_sampleitem", "new_category") # returns ["new_category"]
319319

320320
logical = info["entity_logical_name"] # e.g., "new_sampleitem"
321321

0 commit comments

Comments
 (0)