stephencelis / SQLite.swift

A type-safe, Swift-language layer over SQLite3.
MIT License
9.72k stars 1.57k forks source link

Add "columns" to insert(_ query: QueryType) #1190

Open venkr opened 1 year ago

venkr commented 1 year ago

It's currently not possible to specify which columns to insert into, requiring some hacky manually crafted strings.

Specifically, I'm looking to execute queries of the form: INSERT INTO table_1(a,b,c) SELECT d, e, f from table_2

Today it is only possible to run queries of form: INSERT INTO table_1 SELECT d, e, f from table_2 (or insert using literals)