Sha256: 920d532fa71e2445c133f3f21bd4337a7987c7318cca43d8f9fa95cabcf7f2e5

Contents?: true

Size: 553 Bytes

Versions: 1

Compression:

Stored size: 553 Bytes

Contents

require "rubygems"
require "mysql"    # gem install ruby-mysql -v 2.9.2

my = Mysql.connect('127.0.0.1', 'root', '', 'noschema', 3307)

p my.list_tables
__END__

# look ma, no schema! ooh yeah.
my.query("create table posts")

# insert a few records into our schemaless MySQL store... :-)
my.query("insert into posts values('first post'('author', 'Ilya'),('nick', 'igrigorik'))")
my.query("insert into posts values('author:Ilya','location:Waterloo')")

my.query("select author from posts") { |r| puts r }
my.query("select nick from posts") { |r| puts r }

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
em-proxy-0.1.2 examples/schemaless-mysql/client.rb