@@ -71,7 +71,7 @@ public function classifyException(Nette\Database\DriverException $e): ?string
7171 /********************* SQL ****************d*g**/
7272
7373
74- public function delimite (string $ name ): string
74+ public function delimit (string $ name ): string
7575 {
7676 return '[ ' . strtr ($ name , '[] ' , ' ' ) . '] ' ;
7777 }
@@ -145,7 +145,7 @@ public function getColumns(string $table): array
145145 X, [$ table , $ table ])->fetch ();
146146
147147 $ columns = [];
148- $ rows = $ this ->connection ->query ("PRAGMA table_info( {$ this ->delimite ($ table )}) " );
148+ $ rows = $ this ->connection ->query ("PRAGMA table_info( {$ this ->delimit ($ table )}) " );
149149 while ($ row = $ rows ->fetch ()) {
150150 $ column = $ row ['name ' ];
151151 $ pattern = "/( \"$ column \"|` $ column`| \\[ $ column \\]| $ column) \\s+[^,]+ \\s+PRIMARY \\s+KEY \\s+AUTOINCREMENT/Ui " ;
@@ -172,7 +172,7 @@ public function getColumns(string $table): array
172172 public function getIndexes (string $ table ): array
173173 {
174174 $ indexes = [];
175- $ rows = $ this ->connection ->query ("PRAGMA index_list( {$ this ->delimite ($ table )}) " );
175+ $ rows = $ this ->connection ->query ("PRAGMA index_list( {$ this ->delimit ($ table )}) " );
176176 while ($ row = $ rows ->fetch ()) {
177177 $ id = $ row ['name ' ];
178178 $ indexes [$ id ]['name ' ] = $ id ;
@@ -181,7 +181,7 @@ public function getIndexes(string $table): array
181181 }
182182
183183 foreach ($ indexes as $ index => $ values ) {
184- $ res = $ this ->connection ->query ("PRAGMA index_info( {$ this ->delimite ($ index )}) " );
184+ $ res = $ this ->connection ->query ("PRAGMA index_info( {$ this ->delimit ($ index )}) " );
185185 while ($ row = $ res ->fetch ()) {
186186 $ indexes [$ index ]['columns ' ][] = $ row ['name ' ];
187187 }
@@ -219,7 +219,7 @@ public function getIndexes(string $table): array
219219 public function getForeignKeys (string $ table ): array
220220 {
221221 $ keys = [];
222- $ rows = $ this ->connection ->query ("PRAGMA foreign_key_list( {$ this ->delimite ($ table )}) " );
222+ $ rows = $ this ->connection ->query ("PRAGMA foreign_key_list( {$ this ->delimit ($ table )}) " );
223223 while ($ row = $ rows ->fetch ()) {
224224 $ id = $ row ['id ' ];
225225 $ keys [$ id ]['name ' ] = $ id ;
0 commit comments