-
Notifications
You must be signed in to change notification settings - Fork 2
Pending Features
aravindet edited this page Oct 13, 2012
·
3 revisions
JSON bits are in SloppyJSON (TM)
Nested objects in select is done!
customers.all(
{ age: [>, 25] },
{ embed: { bills: { items: true } } }
);
GET /customers?age:gt:25&fields=bills,bills.items
SELECT a.*, b.*, c.*
FROM (customers AS a LEFT OUTER JOIN bills AS b ON b.customerId = a.id
INNER JOIN billItems as c ON c.billId = b.id)
WHERE a.age > 25
LIMIT 0,10
[
{
id: 123,
name: Alice,
age: 30,
bills: [
{
id: 93284,
date: 2012-10-11,
amount: 1150,
items: [
{ id: 5384792, productId: 9233, rate: 1150, qty: 1 }
]
}
]
},
...
]
javascript
bills.add({
customerId: 123,
date: 2012-10-13,
items: [
{ productId: 9233, rate: 830, qty: 1 }
],
amount: 830
})
```http
POST /bills
(same data as above)
INSERT INTO bills (customerId, date, amount) VALUES (123, 2012-10-13, 830)
INSERT INTO billItems (billId, productId, rate, qty) VALUES (*insert_id, 9233, 830, 1)
Need to sequence operations correctly;
- Indexes (Unique?) - allow only indexed columns in WHERE.
- Hide In Results (password)
Backed into TEXT on MySQL, it will be serialized/deserialized automatically. Like TEXT, cannot be indexed.