0

I have the following record-structures shown in JSON/Typescript format:

(tablename = dimension)
interface Dimension {
    name: string,
    units: Unit[]
}

(tablename = unit)
interface Unit {
    symbol: string,
    is_base: boolean,
}

I want to change the property is_base to false on all units within a dimension in one query. How do i do this? I am using surrealdb.wasm in a Javascript project (I believe this uses Indxdb).

I have tried the following query:

UPDATE dimension:myDimensionID.units.* SET is_base = false

And the query seems to execute successfully, but it does not change the property is_base on any unit record.

Ólavur Nón
  • 161
  • 1
  • 13

0 Answers0