Skip to content

Typescript: update codegen to use accessor_name. #4324

@Shubham8287

Description

@Shubham8287

Client code generators currently use the name field from definitations provided in ModuleDef. This should be updated to use the accessor_name field instead, as new reflects the identifier defined in the module source.

The accessor_name should continue to use proper type casing wherever applicable, the same way we handle name.

The name field should continue to be used for communication with the database over the WebSocket protocol, since it represents the canonical identifier known to the database.

More specifically:
Master already have accessor_name field to TableDef, IndexDef, ReducerDef, ProecureDef, ViewDef, and ColumnDef.

codegens already uses accessor_name for IndexDef, TypedDef but not with others and that needs to be done.

Read comment on indivisual Defs to know more about implementaiton detail - https://github.com/clockworklabs/SpacetimeDB/pull/4323/changes#diff-e066f2b9fc7e350c9a3badf2ed36e847975e3f4cf24de6f37c5639358c1358f5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions