Skip to content

Empty db.array will not error, but generate invalid SQL #86

@turbo

Description

@turbo

For postgres, an empty table passed to db.array will generate syntactically invalid SQL:

(shortened)

model\create tags: DB.array data.topics or {}

yields

INSERT INTO "projects" (<...>, "tags", <...>) VALUES (<...>, ], <...>) RETURNING "id"

This fails because it is rejected by PG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions