kysely
kysely copied to clipboard
Allow inserts to alias table names
I'm not sure if all DBs allow this, but at least in postgres you can alias the table. The specific part of the spec that I'm referencing is this:
INSERT INTO table_name [ AS alias ]
So I can write
INSERT INTO some_schema.some_table AS some_alias (col1)
VALUES (1)
Since QueryCreator.insertInto
doesn't have any overrides for AnyAliasedTable
, there doesn't seem to be a way to do this.
Could we use TableExpression in InsertInto and not Table?