@@ -76,7 +76,7 @@ class Builder extends BaseBuilder
7676 */
7777 protected function _truncate (string $ table ): string
7878 {
79- return 'TRUNCATE TABLE ' . $ table ;
79+ return 'TRUNCATE TABLE ' . $ this -> getFullName ( $ table) ;
8080 }
8181
8282 /**
@@ -122,10 +122,12 @@ protected function _update(string $table, array $values): string
122122 $ valstr [] = $ key . ' = ' . $ val ;
123123 }
124124
125- $ statement = 'UPDATE ' . (empty ($ this ->QBLimit ) ? '' : 'TOP( ' . $ this ->QBLimit . ') ' ) . $ table . ' SET '
125+ $ fullTableName = $ this ->getFullName ($ table );
126+
127+ $ statement = 'UPDATE ' . (empty ($ this ->QBLimit ) ? '' : 'TOP( ' . $ this ->QBLimit . ') ' ) . $ fullTableName . ' SET '
126128 . implode (', ' , $ valstr ) . $ this ->compileWhereHaving ('QBWhere ' ) . $ this ->compileOrderBy ();
127129
128- return $ this ->keyPermission ? $ this ->addIdentity ($ this -> getFullName ( $ table ) , $ statement ) : $ statement ;
130+ return $ this ->keyPermission ? $ this ->addIdentity ($ fullTableName , $ statement ) : $ statement ;
129131 }
130132
131133 /**
@@ -355,7 +357,7 @@ protected function _replace(string $table, array $keys, array $values): string
355357 return $ this ->db ->escapeIdentifiers ($ item );
356358 }, $ keyFields );
357359
358- return 'INSERT INTO ' . $ table . ' ( ' . implode (', ' , $ keys ) . ') VALUES ( ' . implode (', ' , $ values ) . '); ' ;
360+ return 'INSERT INTO ' . $ this -> getFullName ( $ table) . ' ( ' . implode (', ' , $ keys ) . ') VALUES ( ' . implode (', ' , $ values ) . '); ' ;
359361 }
360362
361363 /**
@@ -409,7 +411,7 @@ protected function maxMinAvgSum(string $select = '', string $alias = '', string
409411 */
410412 protected function _delete (string $ table ): string
411413 {
412- return 'DELETE ' . (empty ($ this ->QBLimit ) ? '' : ' TOP ( ' . $ this ->QBLimit . ') ' ) . ' FROM ' . $ table . $ this ->compileWhereHaving ('QBWhere ' );
414+ return 'DELETE ' . (empty ($ this ->QBLimit ) ? '' : ' TOP ( ' . $ this ->QBLimit . ') ' ) . ' FROM ' . $ this -> getFullName ( $ table) . $ this ->compileWhereHaving ('QBWhere ' );
413415 }
414416
415417 /**
0 commit comments