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

.executemany doesn't use Connection.executemany #111

Open
twall opened this issue Jun 12, 2020 · 1 comment
Open

.executemany doesn't use Connection.executemany #111

twall opened this issue Jun 12, 2020 · 1 comment

Comments

@twall
Copy link

twall commented Jun 12, 2020

The executemany method of SqlliteMultiThread just repeatedly calls its own execute, queuing individual execute calls.

It should be straightforward to push an "executemany" op onto the thread and call executemany on those requests.

@twall
Copy link
Author

twall commented Jul 14, 2020

Sample implementation:

                    try:
                        if req == '--many--':
                            cursor.executemany(arg[0], arg[1])
                        else:
                            cursor.execute(req, arg)
                    except Exception as err:

with a corresponding executemany definition:

        def executemany(self, req, items):
            self.execute('--many--', (req, items))

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

No branches or pull requests

1 participant