Skip to content

Commit 3530498

Browse files
Switched table names to singular (#1684)
Co-authored-by: Phoebe Goldman <phoebe@goldman-tribe.org>
1 parent bdf94f1 commit 3530498

File tree

24 files changed

+72
-72
lines changed

24 files changed

+72
-72
lines changed

crates/cli/tests/snapshots/codegen__codegen_csharp.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ namespace SpacetimeDB
497497

498498
}
499499
'''
500-
"RepeatingTestArgs.cs" = '''
500+
"RepeatingTestArg.cs" = '''
501501
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
502502
// WILL NOT BE SAVED. MODIFY TABLES IN RUST INSTEAD.
503503
// <auto-generated />

crates/cli/tests/snapshots/codegen__codegen_rust.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ match table_name {
397397
"pk_multi_identity" => client_cache.handle_table_update_with_primary_key::<pk_multi_identity::PkMultiIdentity>(callbacks, table_update),
398398
"points" => client_cache.handle_table_update_no_primary_key::<point::Point>(callbacks, table_update),
399399
"private" => client_cache.handle_table_update_no_primary_key::<private::Private>(callbacks, table_update),
400-
"repeating_test_args" => client_cache.handle_table_update_with_primary_key::<repeating_test_arg::RepeatingTestArg>(callbacks, table_update),
400+
"repeating_test_arg" => client_cache.handle_table_update_with_primary_key::<repeating_test_arg::RepeatingTestArg>(callbacks, table_update),
401401
"test_a" => client_cache.handle_table_update_no_primary_key::<test_a::TestA>(callbacks, table_update),
402402
"test_d" => client_cache.handle_table_update_no_primary_key::<test_d::TestD>(callbacks, table_update),
403403
"test_e" => client_cache.handle_table_update_with_primary_key::<test_e::TestE>(callbacks, table_update),
@@ -435,7 +435,7 @@ match table_name {
435435
"pk_multi_identity" => client_cache.handle_resubscribe_for_type::<pk_multi_identity::PkMultiIdentity>(callbacks, new_subs),
436436
"points" => client_cache.handle_resubscribe_for_type::<point::Point>(callbacks, new_subs),
437437
"private" => client_cache.handle_resubscribe_for_type::<private::Private>(callbacks, new_subs),
438-
"repeating_test_args" => client_cache.handle_resubscribe_for_type::<repeating_test_arg::RepeatingTestArg>(callbacks, new_subs),
438+
"repeating_test_arg" => client_cache.handle_resubscribe_for_type::<repeating_test_arg::RepeatingTestArg>(callbacks, new_subs),
439439
"test_a" => client_cache.handle_resubscribe_for_type::<test_a::TestA>(callbacks, new_subs),
440440
"test_d" => client_cache.handle_resubscribe_for_type::<test_d::TestD>(callbacks, new_subs),
441441
"test_e" => client_cache.handle_resubscribe_for_type::<test_e::TestE>(callbacks, new_subs),
@@ -709,7 +709,7 @@ pub struct RepeatingTestArg {
709709
}
710710

711711
impl TableType for RepeatingTestArg {
712-
const TABLE_NAME: &'static str = "repeating_test_args";
712+
const TABLE_NAME: &'static str = "repeating_test_arg";
713713
type ReducerEvent = super::ReducerEvent;
714714
}
715715

crates/cli/tests/snapshots/codegen__codegen_typescript.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,7 +612,7 @@ export class RepeatingTestArg extends DatabaseTable
612612

613613
public static *filterByPrevTime(value: BigInt): IterableIterator<RepeatingTestArg>
614614
{
615-
for (let instance of this.db.getTable("repeating_test_args").getInstances())
615+
for (let instance of this.db.getTable("repeating_test_arg").getInstances())
616616
{
617617
if (instance.prevTime === value) {
618618
yield instance;
@@ -622,7 +622,7 @@ export class RepeatingTestArg extends DatabaseTable
622622

623623
public static *filterByScheduledId(value: BigInt): IterableIterator<RepeatingTestArg>
624624
{
625-
for (let instance of this.db.getTable("repeating_test_args").getInstances())
625+
for (let instance of this.db.getTable("repeating_test_arg").getInstances())
626626
{
627627
if (instance.scheduledId === value) {
628628
yield instance;

crates/sdk/examples/quickstart-chat/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ fn connect_to_db() {
173173

174174
/// Register subscriptions for all rows of both tables.
175175
fn subscribe_to_tables() {
176-
subscribe(&["SELECT * FROM User;", "SELECT * FROM Message;"]).unwrap();
176+
subscribe(&["SELECT * FROM user;", "SELECT * FROM message;"]).unwrap();
177177
}
178178

179179
// # Handle user input

crates/sdk/examples/quickstart-chat/module_bindings/message.rs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sdk/examples/quickstart-chat/module_bindings/mod.rs

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sdk/examples/quickstart-chat/module_bindings/send_message_reducer.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sdk/examples/quickstart-chat/module_bindings/set_name_reducer.rs

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sdk/examples/quickstart-chat/module_bindings/user.rs

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/benchmarks/src/circles.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct Vector2 {
1111

1212
// ---------- schemas ----------
1313

14-
#[spacetimedb::table(name = entities)]
14+
#[spacetimedb::table(name = entity)]
1515
pub struct Entity {
1616
#[auto_inc]
1717
#[primary_key]
@@ -30,7 +30,7 @@ impl Entity {
3030
}
3131
}
3232

33-
#[spacetimedb::table(name = circles)]
33+
#[spacetimedb::table(name = circle)]
3434
pub struct Circle {
3535
#[primary_key]
3636
pub entity_id: u32,

0 commit comments

Comments
 (0)