New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TRUNCATE TABLE not working on DB engines #762
Comments
A work around is: note: AUTOINCREMENT/IDENTITY is not yet working on DB engines as per #462 |
I wrote and tested a truncateTable method for Local Storage:
|
This is great! lets get it into the code. Would yo like to make a PR and get credits for the contribution, or would you prefer that I just extend the src with your input here? |
Added LS.truncateTable method to Local Storage Engine
@mathiasrw |
This reverts commit a88c77d. # Conflicts: # test/test607.js
TRUNCATE TABLE works on 'in memory' DB. But using Local Storage DB returns error:
Seems Truncating is done in the line where the
yy.TruncateTable.prototype.execute
method is defined.For in 'in memory' DBs the line
db.tables[tableid].data = [];
is called, thus the Table is empty.For other DB engines the method
alasql.engines[db.engineid].truncateTable(this.table.databaseid || databaseid,tableid, this.ifexists, cb);
is called.It seems this method is not defined for any DB engine.
file: alasql.js
version: 0.3.2
on FF49.0.1, W10
The text was updated successfully, but these errors were encountered: