Skip to content

CLI correct SQL query to update struct field #4530

Description

@corrm
spacetime sql conquer-mmo "SELECT * FROM character_position"
WARNING: This command is UNSTABLE and subject to breaking changes.

 character_id | prev_map_id | last_move_time                   | location                                        | direction
--------------+-------------+----------------------------------+-------------------------------------------------+--------------
 1            | 1010        | 2026-03-01T11:21:18.924697+00:00 | (map_id = 1010, x = 61, y = 109, elevation = 0) | (south = ())
spacetime sql conquer-mmo "UPDATE character_position SET location = (1000, 61, 109, 0) WHERE character_id = 1"
WARNING: This command is UNSTABLE and subject to breaking changes.

Error: Unsupported column/variable assignment expression: (1000, 61, 109, 0)

i tired a lot of syntax but no luck!. the docs show this syntax but i cant understand how to make it work!:

UPDATE table SET [ '(' assignment { ',' assignment } ')' ] [ WHERE predicate ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions