Sha256: 01f2c5e09eae45ddb9f8cecb933bb65716b4afa53d89bbdc3b3345f48f2a4065

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

Basics:
-------

Underneath everything is the Ruby Sequel library; there are a number
of ways to access it.

Check out http://ricostacruz.com/cheatsheets/sequel.html and 





fixie:0 > o.groups.by_name(cl.id).inner.count
1
fixie:0 > o.groups.by_name(cl.id).inner.delete
1
fixie:0 > o.groups.by_name(cl.id).inner.count     


* Changing email for user in fixie

USERS.by_username('anujbiyani').inner.update(:email=>"anujbiyani01@gmail.com")



* Adding a record
```ruby
u=USERS['a_username']
o=ORGS['an_org']
pivotal = USERS['pivotal']
now = Sequel.function(:NOW)

ASSOCS.inner.insert(:org_id=>o.id, :user_id=>u.id, :last_updated_by=>pivotal.authz_id,
	:created_at=>now, :updated_at=>now )
```

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
chef_fixie-0.1.0 doc/AccessingSQL.md