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

Add sql and expanded_sql methods to the statement object #498

Merged
merged 1 commit into from
Feb 2, 2024

Conversation

tenderlove
Copy link
Member

These methods allow you to retrieve the SQL statement that was used to create the statement object. The sql method just returns the sql statement, where the expanded_sql method returns the statement but with bind parameters substituted.

This should aid with debugging and other tasks.

Fixes #293

These methods allow you to retrieve the SQL statement that was used to
create the statement object.  The `sql` method just returns the sql
statement, where the `expanded_sql` method returns the statement but
with bind parameters substituted.

This should aid with debugging and other tasks.

Fixes #293
@flavorjones flavorjones merged commit 5c48660 into main Feb 2, 2024
101 of 102 checks passed
@flavorjones flavorjones deleted the add-sql-to-statement branch February 2, 2024 16:34
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.

Possible to make SQLite3::Statement#to_s more useful?
2 participants