@@ -123,7 +123,7 @@ public function compileColumns($table)
123
123
return sprintf (
124
124
'select name, type, not "notnull" as "nullable", dflt_value as "default", pk as "primary" '
125
125
.'from pragma_table_info(%s) order by cid asc ' ,
126
- $ this ->wrap (str_replace ('. ' , '__ ' , $ table ))
126
+ $ this ->quoteString (str_replace ('. ' , '__ ' , $ table ))
127
127
);
128
128
}
129
129
@@ -136,12 +136,12 @@ public function compileColumns($table)
136
136
public function compileIndexes ($ table )
137
137
{
138
138
return sprintf (
139
- 'select " primary" as name, group_concat(col) as columns, 1 as "unique", 1 as "primary" '
139
+ 'select \' primary \' as name, group_concat(col) as columns, 1 as "unique", 1 as "primary" '
140
140
.'from (select name as col from pragma_table_info(%s) where pk > 0 order by pk, cid) group by name '
141
- .'union select name, group_concat(col) as columns, "unique", origin = "pk" as "primary" '
141
+ .'union select name, group_concat(col) as columns, "unique", origin = \' pk \' as "primary" '
142
142
.'from (select il.*, ii.name as col from pragma_index_list(%s) il, pragma_index_info(il.name) ii order by il.seq, ii.seqno) '
143
143
.'group by name, "unique", "primary" ' ,
144
- $ table = $ this ->wrap (str_replace ('. ' , '__ ' , $ table )),
144
+ $ table = $ this ->quoteString (str_replace ('. ' , '__ ' , $ table )),
145
145
$ table
146
146
);
147
147
}
@@ -159,7 +159,7 @@ public function compileForeignKeys($table)
159
159
.'group_concat("to") as foreign_columns, on_update, on_delete '
160
160
.'from (select * from pragma_foreign_key_list(%s) order by id desc, seq) '
161
161
.'group by id, "table", on_update, on_delete ' ,
162
- $ this ->wrap (str_replace ('. ' , '__ ' , $ table ))
162
+ $ this ->quoteString (str_replace ('. ' , '__ ' , $ table ))
163
163
);
164
164
}
165
165
0 commit comments