Wonder if the ruby sqlite3 gem is adding the hash to the database filename?
This has just started since I upgraded the gem.
I am getting a filename like the following:
sqlanalyzer_kV9H94Za3G_HofxNm4Potw.db
where I'm expecting a filename like the following:
sqlanalyzer.db
The following code is used to create the database file.
require 'sqlite3'
module SQLAnalyzer
class DB
@@db_file_name = 'sqlanalyzer.db'
def self.get_db(memory = 500, db_file_name = 'sqlanalyzer.db')
@@db_file_name = db_file_name
db = SQLite3::Database.new(@@db_file_name)
db.execute('PRAGMA page_size = 32768')
db.execute("PRAGMA cache_size = #{(memory.to_i * 1024 * 1024) /
32768.to_i}")
db.execute('PRAGMA synchronous = OFF')
db.execute('PRAGMA count_changes = 0')
db.execute('PRAGMA journal_mode = OFF')
db.execute('PRAGMA temp_store = MEMORY')
db.results_as_hash = true
db
end
def self.get_db_file_name
@@db_file_name
end
end
end
Default filename should be used as only the memory parameter is being
passed in:
@extractor = SQLAnalyzer::Extractor.new(CSQLAnalyzer::DB.get_db(500),
Dir.pwd, false)
Thanks!
Dave
--
You received this message because you are subscribed to the Google Groups
"sqlite3-ruby" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlite3-ruby/68bb1112-f5cb-44be-a07a-13e47413ffc6%40googlegroups.com.