Sha256: 1c2df207b5c93f1d7afee7713b42f758e67c28e568b4b8c104e7655a20d0e15c
Contents?: true
Size: 451 Bytes
Versions: 1
Compression:
Stored size: 451 Bytes
Contents
class Birt::Mysql def self.client(data_source) @client ||=Mysql2::Client.new( host: data_source.host, port: data_source.port, username: data_source.username, password: data_source.password, database: data_source.database ) end def self.query(data_source, query_text) client = client(data_source) results = client.query(query_text) yield(results) if block_given? results end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
birt-0.1.1 | lib/birt/mysql.rb |