Named vs numbered SQL parameters
Lassi Kortela
(18 Sep 2019 08:48 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(18 Sep 2019 09:13 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(18 Sep 2019 09:35 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(18 Sep 2019 09:49 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(18 Sep 2019 10:10 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(18 Sep 2019 10:16 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(18 Sep 2019 10:30 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(18 Sep 2019 10:38 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(18 Sep 2019 10:50 UTC)
|
Re: Named vs numbered SQL parameters
Alaric Snell-Pym
(18 Sep 2019 10:39 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(19 Sep 2019 14:20 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(19 Sep 2019 14:53 UTC)
|
Re: Named vs numbered SQL parameters
Alaric Snell-Pym
(19 Sep 2019 16:05 UTC)
|
Re: Named vs numbered SQL parameters
John Cowan
(18 Sep 2019 22:36 UTC)
|
Re: Named vs numbered SQL parameters Peter Bex (19 Sep 2019 07:20 UTC)
|
Re: Named vs numbered SQL parameters
John Cowan
(19 Sep 2019 13:54 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(19 Sep 2019 14:04 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(19 Sep 2019 14:07 UTC)
|
Re: Named vs numbered SQL parameters
Peter Bex
(19 Sep 2019 14:19 UTC)
|
Re: Named vs numbered SQL parameters
Lassi Kortela
(19 Sep 2019 14:28 UTC)
|
Re: Named vs numbered SQL parameters
Alaric Snell-Pym
(19 Sep 2019 16:00 UTC)
|
On Wed, Sep 18, 2019 at 06:36:08PM -0400, John Cowan wrote: > SQLite, My+Maria, Oracle, and SQL Server all support named parameters, some > with colons, some with @ signs (: does have meaning in SQL array slices, @ > does not). Postgres has no support at present. Are you sure? From what I can gather, MySQL/MariaDB only supports question marks: https://dev.mysql.com/doc/refman/5.7/en/prepare.html Indeed, SQLite has several syntaxes for named params: https://sqlite.org/c3ref/bind_blob.html Microsoft SQL only seems to support question marks in arbitrary statements: https://docs.microsoft.com/en-us/sql/relational-databases/native-client-odbc-queries/using-statement-parameters?view=sql-server-2017 AFAICT, stored procedures can be called with parameters by name: https://docs.microsoft.com/en-us/sql/odbc/reference/develop-app/binding-parameters-by-name-named-parameters?view=sql-server-2017 I find it hard to find anything definitive regarding Oracle. > But if you take up my suggestion for a fairly simplistic/agnostic SQL DSL, > you don't need parameters, named or nameless. I emphatically disagree. IMO, the DSL is another layer that lies on top of the underlying DBI. The DBI layer *must* have a way to separate SQL queries from parameters. Cheers, Peter