AndKenOnDrumsA
Convex Community3y ago
3 replies
AndKenOnDrums

Schema types: is loose really ok?

Regarding this page on dynamic schemas: https://docs.convex.dev/database/advanced/schema-philosophy

Let's say I have a table called
variables
with fields
name
,
type
, and
value
, and each entry can either be an integer, string, or boolean. Is there any downside to just storing the
value
field with different types? For example:

{ name: "foo", type: "int",    value: 1234 }

{ name: "bar", type: "string", value: "hello" }

{ name: "baz", type: "bool",   value: true }


The link above says that Convex has my back, but wondering if there are performance issues or other gotchas (aside from the fact that I need to check the type in my code).
With Convex there is no need to write any CREATE TABLE statements, or think
Was this page helpful?