Field name problem
- Dominant language
- Racket
- Stars
- 65
- Forks
- 11
- PR merge metrics
- No merged PRs in 30d
Description
The following program provokes an error:
; prepare: no such column: GITHUB
I suspect that (somewhere) there an "deta field name to sql fieldname" conversion missing.
```
#lang racket
(require deta db threading)
(define db
(sqlite3-connect #:database "bug.db"
#:mode 'create))
(define-schema github-user
([id id/f #:primary-key #:auto-increment]
[user-id integer/f] ; racket-stories user-id
[github-id integer/f #:unique] ; github user id
[login string/f #:unique] ; github login (username)
[real-name string/f]
[email string/f]
[avatar-url string/f]
[blog-url string/f]))
(create-table! db 'github-user)
(lookup db (~> (from github-user #:as gu)
(where (= github-id 123))))
```
the full error:
```
; prepare: no such column: GITHUB
; error code: 1
; Context:
; /Applications/Racket v7.4/collects/db/private/sqlite3/connection.rkt:466:0 handle-status*
; /Applications/Racket v7.4/collects/db/private/sqlite3/connection.rkt:422:8
; /Applications/Racket v7.4/collects/db/private/sqlite3/connection.rkt:225:4 prepare1* method in connection%
; /Users/soegaard/Library/Racket/7.4/pkgs/deta-lib/private/query.rkt:23:2
; /Applications/Racket v7.4/collects/db/private/generic/functions.rkt:90:0 compose-statement
; /Applications/Racket v7.4/share/pkgs/db-lib/db/private/generic/functions2.rkt:64:0
; /Users/soegaard/Library/Racket/7.4/pkgs/deta-lib/query.rkt:254:0 unpack219
; /Users/soegaard/Library/Racket/7.4/pkgs/deta-lib/query.rkt:267:0 lookup
; "/Users/soegaard/tmp/bug.rkt":1:1 [running body]
; [Due to errors, REPL is just module language, requires, and stub definitions]
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.