Skip to content

Commit 2ca22fe

Browse files
committed
3.0.0-alpha.3
1 parent 9ab69c3 commit 2ca22fe

File tree

8 files changed

+391
-237
lines changed

8 files changed

+391
-237
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
##### 3.0.0-alpha.3 - 26 February 2016
2+
3+
###### Backwards compatible API changes
4+
- Removed returnDeletedIds option
5+
- Added insertOpts, updateOpts, deleteOpts, and runOpts options
6+
17
##### 3.0.0-alpha.2 - 26 February 2016
28

39
###### Backwards compatible bug fixes

CONTRIBUTORS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
# Names should be added to this file as:
66
# [commit count] Name <email address>
77
1 InternalFX <bryan@internalfx.com>
8-
43 Jason Dobry <jason.dobry@gmail.com>
8+
44 Jason Dobry <jason.dobry@gmail.com>
99
2 Ollie Relph <ollie@relph.me>

README.md

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,30 @@ To get started, visit __[http://js-data.io](http://www.js-data.io)__.
2828
`npm install --save js-data js-data-rethinkdb`.
2929

3030
```js
31+
// Use Container instead of DataStore on the server
3132
import {Container} from 'js-data'
3233
import RethinkDBAdapter from 'js-data-rethinkdb'
3334

35+
// Create a store to hold your Mappers
3436
const store = new Container()
37+
38+
// Create an instance of RethinkDBAdapter with default settings
3539
const adapter = new RethinkDBAdapter()
3640

37-
// "store" will now use the RethinkDB adapter for all async operations
38-
store.registerAdapter('rethinkdb', adapter, { default: true });
41+
// Mappers in "store" will use the RethinkDB adapter by default
42+
store.registerAdapter('rethinkdb', adapter, { default: true })
43+
44+
// Create a Mapper that maps to a "user" table
45+
store.defineMapper('user')
46+
```
3947

40-
store.defineMapper('user');
48+
```js
49+
async function findAllAdminUsers () {
50+
// Find all users where "user.role" == "admin"
51+
return await store.findAll('user', {
52+
role: 'admin'
53+
})
54+
}
4155
```
4256

4357
## Example App

0 commit comments

Comments
 (0)