- Timestamp:
- 10/06/2007 04:38:39 AM (19 years ago)
- branch-nick:
- xbase
- revision id:
- dsowen@fugue88.ws-20071006043839-k24vfijhbb4ogdor
- File:
-
- 1 edited
-
main/xbase.lisp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
main/xbase.lisp
r4 r5 129 129 ((string= type "D") 'string) 130 130 ((string= type "M") 'string) 131 ((string= type "L") 'string) 131 132 (t (abort))))) 132 133 `(,(intern name) ,type ,size)))) … … 146 147 (defun sql-escape-fieldname (name) 147 148 (let ((name (string-downcase name))) 148 (if (member name '(" user") :test 'equal)149 (if (member name '("group" "user") :test 'equal) 149 150 (concatenate 'string "\"" name "\"") 150 151 name))) … … 153 154 (if (string= value "") 154 155 "null" 155 (format nil "'~A'" (cl-ppcre:regex-replace-all "'" value "''")))) 156 (let ((value 157 (concatenate 'string "'" (regex-replace-all "'" value "''") "'"))) 158 (when (find #\\ value :test 'char=) 159 (setf value (concatenate 'string 160 "E" 161 (regex-replace-all "\\\\" 162 value 163 "\\\\\\\\")))) 164 value))) 156 165 157 166 (defun sql-column (desc) … … 174 183 (warn "MEMOs aren't implemented yet.") 175 184 "NUMERIC(10)") 185 ((string= type "L") 186 "BOOLEAN") 176 187 (t (error "Bad type ~S." type)))))) 177 188
Note: See TracChangeset
for help on using the changeset viewer.
