Skip to content

Commit 3ba3bb2

Browse files
committed
Ignore lowercase in toTypes
1 parent cf43903 commit 3ba3bb2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sqlbuilder.nimble

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Package
22

3-
version = "1.1.2"
3+
version = "1.1.3"
44
author = "ThomasTJdev"
55
description = "SQL builder"
66
license = "MIT"

src/sqlbuilderpkg/totypes.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ proc sqlToTypeAs*[T](t: typedesc[T], columns, val: seq[string]): T =
7373
var
7474
found = false
7575
for ci in 0..columns.high:
76-
let cSplit = columns[ci].toLowerAscii().split(" as ")
76+
let cSplit = if columns[ci].contains(" as "): columns[ci].split(" as ") else: columns[ci].split(" AS ")
7777
if cSplit.len() == 2:
7878
if cSplit[1].strip() == fieldName:
7979
parseVal(val[ci], field)

0 commit comments

Comments
 (0)