digital-fabric / extralite

Ruby on SQLite
http://www.rubydoc.info/gems/extralite
MIT License
255 stars 8 forks source link

Add support for binding BLOB values #40

Closed gschlager closed 11 months ago

gschlager commented 11 months ago

Strings with ASCII_8BIT encoding and Extralite::Blob objects will be bound as BLOBs.

db.execute('insert into foo values (?)', File.binread('/path/to/file'))
db.execute('insert into foo values (?)', Extralite::Blob.new('Hello, 世界!'))
db.execute('insert into foo values (?)', 'Hello, 世界!'.force_encoding(Encoding::ASCII_8BIT))
noteflakes commented 11 months ago

Fantastic work @gschlager !

fractaledmind commented 11 months ago

@gschlager: You should come join the Naming Things Discord server. We have a very active group talking about Ruby and SQLite, with a lot of work and discussion in particular about the Extralite gem. We'd love to have you there: https://discord.gg/qKkAanA9