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

Converts Calls With Parameters to &optional instead of &rest #61

Merged
merged 1 commit into from
Mar 13, 2020

Conversation

kat-co
Copy link
Contributor

@kat-co kat-co commented Mar 12, 2020

Passing large numbers of arguments within a &rest variable is not
very portable Common Lisp because of
call-arguments-limit.

For performance reasons, users may want many bind parameters to take
advantage of so-called extended inserts, e.g.:

INSERT INTO tbl_name (a,b,c) VALUES(?,?,?),(?,?,?),(?,?,?),(?,?,?),...

When this is the case, cl-dbi is artificially coupling how many &rest
parameters can be passed with how many extended inserts a DB can
support thus potentially artificially limiting an application's
performance. Further, it becomes more difficult to write portable code
because of this implementation detail.

fixes #60

Passing large numbers of arguments within a `&rest` variable is not
very portable Common Lisp because of
[call-arguments-limit](http://www.lispworks.com/documentation/HyperSpec/Body/v_call_a.htm).

For performance reasons, users may want many bind parameters to take
advantage of so-called extended inserts, e.g.:

`INSERT INTO tbl_name (a,b,c) VALUES(?,?,?),(?,?,?),(?,?,?),(?,?,?),...`

When this is the case, cl-dbi is artificially coupling how many `&rest`
parameters can be passed with how many extended inserts a DB can
support thus potentially artificially limiting an application's
performance. Further, it becomes more difficult to write portable code
because of this implementation detail.

fixes fukamachi#60
@kat-co
Copy link
Contributor Author

kat-co commented Mar 12, 2020

Please note: I have not run the tests locally. My local docker-compose is currently broken.

@fukamachi fukamachi merged commit b88f328 into fukamachi:master Mar 13, 2020
fukamachi added a commit that referenced this pull request Mar 13, 2020
fukamachi added a commit that referenced this pull request Mar 13, 2020
fukamachi added a commit to fukamachi/datafly that referenced this pull request Mar 13, 2020
fukamachi added a commit to fukamachi/mito that referenced this pull request Mar 13, 2020
fukamachi added a commit to fukamachi/integral that referenced this pull request Mar 13, 2020
fukamachi added a commit to fukamachi/crane that referenced this pull request Mar 13, 2020
`dbi:execute` now takes the parameters as a list.
refs fukamachi/cl-dbi#61
fukamachi added a commit to fukamachi/dbd-oracle that referenced this pull request Mar 13, 2020
`dbi:execute` now takes the parameters as a list.
refs fukamachi/cl-dbi#61
fukamachi added a commit to fukamachi/cl-dbi-connection-pool that referenced this pull request Mar 13, 2020
`dbi:execute` now takes the parameters as a list.
refs fukamachi/cl-dbi#61
fukamachi added a commit to fukamachi/cl-batis that referenced this pull request Mar 13, 2020
`dbi:execute` now takes the parameters as a list.
refs fukamachi/cl-dbi#61
vindarel added a commit to vindarel/cl-dbi that referenced this pull request Apr 10, 2020
vindarel added a commit to vindarel/cl-dbi that referenced this pull request Apr 10, 2020
mohammad-matini added a commit to kayisoft/kayishort that referenced this pull request Oct 5, 2021
dbi:execute now takes its parameters as a list, see:
fukamachi/cl-dbi#61
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

Successfully merging this pull request may close these issues.

Please Consider Converting prepare-sql from Variadic to take in a list
2 participants