-
Notifications
You must be signed in to change notification settings - Fork 212
Description
I am trying to understand how the gem determines whether or not to include the database_name method in the definition of the Statement class.
The code references a HAVE_SQLITE3_COLUMN_DATABASE_NAME constant in two places:
sqlite3-ruby/ext/sqlite3/statement.c
Line 414 in 5361528
| #ifdef HAVE_SQLITE3_COLUMN_DATABASE_NAME |
sqlite3-ruby/ext/sqlite3/statement.c
Line 452 in 5361528
| #ifdef HAVE_SQLITE3_COLUMN_DATABASE_NAME |
And the tests say that this method is defined or not depending on how SQLite was compiled:
sqlite3-ruby/test/test_statement.rb
Line 48 in 5361528
| # This method may not exist depending on how sqlite3 was compiled |
But, a search of the SQLite source doesn't return any use of this constant. And the docs say that the compilation flag used is SQLITE_ENABLE_COLUMN_METADATA.
So, how and where is the HAVE_SQLITE3_COLUMN_DATABASE_NAME constant set and how does that relate to the SQLITE_ENABLE_COLUMN_METADATA compilation flag?