Low commit activity in last 3 years
No release in over a year
This GEM is required by the infopark_fiona_connector when using MySQL.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.5, >= 0.5.5
 Project Readme

MysqlBlobStreaming

Build Status

A blob streaming extension for the native Ruby-MySQL2 adaptor. It provides the class MysqlBlobStreaming, which gives the mysql2 adaptor the ability of streaming blobs right out of the MySQL database.

(c) 2008-2012 Infopark AG. See MIT-LICENSE for licensing details.

Usage

require 'mysql_blob_streaming'
require 'mysql2'

client = Mysql2::Client.new(...)
query = "SELECT data FROM table_name WHERE id = '23'"
buffer_size = 1024000 # number of bytes per chunk

MysqlBlobStreaming.stream(client, query, buffer_size) do |chunk|
  # do something with the chunk e.g. write it to file.
end

Dependencies

Building

gem build mysql_blob_streaming.gemspec

Installation

Install it like any other Gem:

gem install mysql_blob_streaming-X.X.X.gem

Run it with root privileges if needed.

Development/Tests

rake