From 5759ae50bb372afefa5c6b0c99f25f4fdf86e153 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Tue, 28 Apr 2015 21:32:52 +0200 Subject: [PATCH] Handle SQLite typemod in type name normalisation. Should fix #220. --- src/sources/sqlite/sqlite-cast-rules.lisp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sources/sqlite/sqlite-cast-rules.lisp b/src/sources/sqlite/sqlite-cast-rules.lisp index 8e8a57f..dcec51c 100644 --- a/src/sources/sqlite/sqlite-cast-rules.lisp +++ b/src/sources/sqlite/sqlite-cast-rules.lisp @@ -53,9 +53,11 @@ CAST machinery. Transform it to the data_type, or dtype." (let* ((sqlite-type-name (string-downcase sqlite-type-name)) (tokens (remove-if (lambda (token) - (member token '("unsigned" "short" - "varying" "native") - :test #'string-equal)) + (or (member token '("unsigned" "short" + "varying" "native") + :test #'string-equal) + ;; remove typemod too, as in "integer (8)" + (char= #\( (aref token 0)))) (sq:split-sequence #\Space sqlite-type-name)))) (assert (= 1 (length tokens))) (first tokens)))