spacetimedb 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spacetimedb",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
4
4
  "description": "API and ABI bindings for the SpacetimeDB TypeScript module library",
5
5
  "homepage": "https://github.com/clockworklabs/SpacetimeDB#readme",
6
6
  "bugs": {
package/src/lib/schema.ts CHANGED
@@ -91,7 +91,10 @@ export function tableToSchema<
91
91
 
92
92
  type AllowedCol = keyof T['rowType']['row'] & string;
93
93
  return {
94
- sourceName: accName,
94
+ // For client,`schama.tableName` will always be there as canonical name.
95
+ // For module, if explicit name is not provided via `name`, accessor name will
96
+ // be used, it is stored as alias in database, hence works in query builder.
97
+ sourceName: schema.tableName || accName,
95
98
  accessorName: accName,
96
99
  columns: schema.rowType.row, // typed as T[i]['rowType']['row'] under TablesToSchema<T>
97
100
  rowType: schema.rowSpacetimeType,