remove outdated warning message (#4928)

Co-authored-by: Olivier Cavadenti <olivier.cavadenti@gmail.com>
This commit is contained in:
Beeno Tung 2022-01-15 04:19:31 +08:00 committed by GitHub
parent dec8438ed8
commit 5e6b3c2d6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 40 deletions

View File

@ -22,12 +22,6 @@ class QueryCompiler_SQLite3 extends QueryCompiler {
const { returning } = this.single;
if (returning) {
this.client.logger.warn(
'.returning() is not supported by sqlite3 and will not have any effect.'
);
}
// The locks are not applicable in SQLite3
this.forShare = emptyStr;
this.forKeyShare = emptyStr;

View File

@ -9985,40 +9985,6 @@ describe('QueryBuilder', () => {
}).to.throw(Error);
});
it('should warn to user when use `.returning()` function in SQLite3', () => {
const loggerConfigForTestingWarnings = {
log: {
warn: (message) => {
if (
message ===
'.returning() is not supported by sqlite3 and will not have any effect.'
) {
throw new Error(message);
}
},
},
};
const sqlite3ClientForWarnings = new SQLite3_Client(
Object.assign({ client: 'sqlite3' }, loggerConfigForTestingWarnings)
);
expect(() => {
testsql(
qb().into('users').insert({ email: 'foo' }).returning('id'),
{
sqlite3: {
sql: 'insert into `users` (`email`) values (?)',
bindings: ['foo'],
},
},
{
sqlite3: sqlite3ClientForWarnings,
}
);
}).to.throw(Error);
});
it('join with subquery using .withSchema', () => {
testsql(
qb()