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
Remove query builder's .build() from llm docs (#4398)
# Description of Changes
Removes left over references to the query builder's `.build()` method as
well as some stale C# references from `llms.md`.
Only rust and C# docs needed updating.
# API and ABI breaking changes
None
# Expected complexity level and risk
1. Small docs update
# Testing
N/A
Copy file name to clipboardExpand all lines: docs/static/llms.md
+12-16Lines changed: 12 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -965,13 +965,13 @@ Both contexts provide read-only access to tables and indexes through `ctx.db`.
965
965
Views can return:
966
966
- `Option<T>` - For at-most-one row (e.g., looking up a specific player)
967
967
- `Vec<T>` - For multiple rows (e.g., listing all players at a level)
968
-
- `Query<T>` - A typed SQL query that behaves like the deprecated RLS (Row-Level Security) feature
968
+
- `impl Query<T>` - A typed SQL query that behaves like the deprecated RLS (Row-Level Security) feature
969
969
970
970
Where `T` can be a table type or any custom type derived with `SpacetimeType`.
971
971
972
-
**Query<T> Return Type**
972
+
**impl Query<T> Return Type**
973
973
974
-
When a view returns `Query<T>`, SpacetimeDB computes results incrementally as the underlying data changes. This enables efficient table scanning because query results are maintained incrementally rather than recomputed from scratch. Without `Query<T>`, you must use indexed column lookups to access tables inside view functions.
974
+
When a view returns `impl Query<T>`, SpacetimeDB computes results incrementally as the underlying data changes. This enables efficient table scanning because query results are maintained incrementally rather than recomputed from scratch. Without `impl Query<T>`, you must use indexed column lookups to access tables inside view functions.
975
975
976
976
The query builder provides a fluent API for constructing type-safe SQL queries:
977
977
@@ -981,11 +981,9 @@ use spacetimedb::{view, ViewContext, Query};
981
981
// This view can scan the whole table efficiently because
@@ -1870,25 +1868,23 @@ Both contexts provide read-only access to tables and indexes through `ctx.Db`.
1870
1868
Views can return:
1871
1869
- `T?` (nullable) - For at-most-one row (e.g., looking up a specific player)
1872
1870
- `List<T>` or `T[]` - For multiple rows (e.g., listing all players at a level)
1873
-
- `Query<T>` - A typed SQL query that behaves like the deprecated RLS (Row-Level Security) feature
1871
+
- `IQuery<T>` - A typed SQL query that behaves like the deprecated RLS (Row-Level Security) feature
1874
1872
1875
1873
Where `T` can be a table type or any custom type marked with `[SpacetimeDB.Type]`.
1876
1874
1877
-
**Query<T> Return Type**
1875
+
**IQuery<T> Return Type**
1878
1876
1879
-
When a view returns `Query<T>`, SpacetimeDB computes results incrementally as the underlying data changes. This enables efficient table scanning because query results are maintained incrementally rather than recomputed from scratch. Without `Query<T>`, you must use indexed column lookups to access tables inside view functions.
1877
+
When a view returns `IQuery<T>`, SpacetimeDB computes results incrementally as the underlying data changes. This enables efficient table scanning because query results are maintained incrementally rather than recomputed from scratch. Without `IQuery<T>`, you must use indexed column lookups to access tables inside view functions.
1880
1878
1881
1879
The query builder provides a fluent API for constructing type-safe SQL queries:
1882
1880
1883
1881
```csharp
1884
1882
// This view can scan the whole table efficiently because
1885
-
// Query<T> results are computed incrementally
1883
+
// IQuery<T> results are computed incrementally
1886
1884
[SpacetimeDB.View(Accessor = "MyMessages", Public = true)]
1887
-
public static Query<Message> MyMessages(ViewContext ctx)
1885
+
public static IQuery<Message> MyMessages(ViewContext ctx)
0 commit comments