Skip to content

Instantly share code, notes, and snippets.

@avital
Forked from swannodette/SSCollectionJSON.js
Created January 19, 2009 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save avital/48816 to your computer and use it in GitHub Desktop.
Save avital/48816 to your computer and use it in GitHub Desktop.
read
----
{
"action": "read",
"table": "user/shift/trail/comment",
"constraints": {
"user_id": 67
},
"properties": "*" || ["username", "summary", "modified"],
"orderby": ["<" || ">", "modified"],
"startIndex": 2,
"range": {
"startIndex": 2, // array base is 0
"count": 20
}
}
- returns array of results
delete
------
{
"action": "delete",
"table": "user/shift/trail/comment",
"constraints": {
"user_id": 67
},
}
- returns number of rows deleted
update
------
{
"action": "update",
"table": "user/shift/trail/comment",
"constraints": {
"user_id": 67
},
"values": {
"user_id": 68,
"name": "Avital"
}
}
- returns number of rows updated
create
------
{
"action": "create",
"table": "user/shift/trail/comment",
"values": {
"name": "Avital"
}
}
- returns new id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment