File tree Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Expand file tree Collapse file tree 3 files changed +17
-7
lines changed Original file line number Diff line number Diff line change 31
31
32
32
(defrule sqlite-typemod (or sqlite-double-typemod sqlite-single-typemod))
33
33
34
- (defrule sqlite-type-name (and (* extra-qualifiers)
35
- (+ (or (alpha-char-p character ) #\_ ))
34
+ ; ; type names may be "double quoted", such as "double precision"
35
+ (defrule sqlite-type-name (or (+ (and (not extra-qualifiers)
36
+ (+ (or (alpha-char-p character ) #\_ ))
37
+ (? " " ))))
38
+ (:text t ))
39
+
40
+ (defrule sqlite-type-expr (and (* extra-qualifiers)
41
+ sqlite-type-name
36
42
(* extra-qualifiers)
37
43
ignore-whitespace
38
44
(? sqlite-typemod)
39
45
ignore-whitespace
40
46
(* extra-qualifiers))
41
- (:lambda (tn) (list (text (second tn))
42
- (fifth tn)
43
- (remove-if #' null
44
- (append (first tn) (third tn) (seventh tn))))))
47
+ (:lambda (tn)
48
+ (list (text (second tn))
49
+ (fifth tn)
50
+ (remove-if #' null
51
+ (append (first tn) (third tn) (seventh tn))))))
45
52
46
53
(defun parse-sqlite-type-name (type-name)
47
54
(if (string= type-name " " )
48
55
; ; yes SQLite allows for empty type names
49
56
" text"
50
- (values-list (parse ' sqlite-type-name (string-downcase type-name)))))
57
+ (values-list (parse ' sqlite-type-expr (string-downcase type-name)))))
Original file line number Diff line number Diff line change 35
35
(:source (:type " double" ) :target (:type " double precision" )
36
36
:using pgloader.transforms ::float-to-string)
37
37
38
+ (:source (:type " double precision" ) :target (:type " double precision" )
39
+ :using pgloader.transforms ::float-to-string)
40
+
38
41
(:source (:type " numeric" ) :target (:type " numeric" :drop-typemod nil )
39
42
:using pgloader.transforms ::float-to-string)
40
43
You can’t perform that action at this time.
0 commit comments