JordanMarr / SqlHydra

SqlHydra is a suite of NuGet packages for working with databases in F# including code generation tools and query expressions.
MIT License
212 stars 20 forks source link

Public Schema Not Properly Escaped for NpgSQL in v2.4+ #93

Closed devinlyons closed 3 weeks ago

devinlyons commented 4 weeks ago

v2.3 generates a line of code with the following valid syntax:

let lazypublicmigration = lazy (``public``.Readers.migrationReader (reader, buildGetOrdinal 3))

v2.4 generates this invalid code:

let ``lazy``public``migration`` = lazy (``public``.Readers.migrationReader(reader, buildGetOrdinal 3))

v2.5 generates this invalid code:

let ``lazy``public``migration`` = lazy (``public``.Readers.migrationReader(reader, buildGetOrdinal typeof<public.migration>))

NOTE: the syntax for typeof<public.migration> should be typeof<``public``.migration>

JordanMarr commented 3 weeks ago

Looks like both bugs resulted from the total rewrite of the gen code. Apparently, none of my test databases have a public schema that triggers this condition.

JordanMarr commented 3 weeks ago

SqlHydra.Cli v2.5.1 has been released with the fix.

I had it backwards: image