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.
@@ -5036,7 +5036,10 @@ var ViewResultHeader = t.enum("ViewResultHeader", {
5036
5036
  function tableToSchema(accName, schema2, tableDef) {
5037
5037
  const getColName = (i) => schema2.rowType.algebraicType.value.elements[i].name;
5038
5038
  return {
5039
- sourceName: accName,
5039
+ // For client,`schama.tableName` will always be there as canonical name.
5040
+ // For module, if explicit name is not provided via `name`, accessor name will
5041
+ // be used, it is stored as alias in database, hence works in query builder.
5042
+ sourceName: schema2.tableName || accName,
5040
5043
  accessorName: accName,
5041
5044
  columns: schema2.rowType.row,
5042
5045
  // typed as T[i]['rowType']['row'] under TablesToSchema<T>