Skip to content
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

transactions does not seem to work with indexeddb #1969

Open
Spark0482 opened this issue Sep 9, 2024 · 0 comments
Open

transactions does not seem to work with indexeddb #1969

Spark0482 opened this issue Sep 9, 2024 · 0 comments

Comments

@Spark0482
Copy link

Spark0482 commented Sep 9, 2024

Hello.

I'm trying to use alasql for our browser app.
We need to use transactions on IndexedDb. It seems that transactions are not implemented for INDEXEDDB.

Here's my code
`const queriesAttach = [
'ATTACH INDEXEDDB DATABASE ' + SCHEMA_NAME,
'USE ' + SCHEMA_NAME
];

return new Observable((subscriber) => {
  alasql.promise(queriesAttach)
    .then(() => alasql.promise('BEGIN TRANSACTION'))
    .then(() => alasql.promise(query))
    .then(() => alasql.promise('COMMIT TRANSACTION'))
    .then((res) => subscriber.next(res))
    .catch((error) => console.error(error));
});`

I get the error
l.engines[l.databases[l.useid].engineid].begin is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants