Skip to content
This repository has been archived by the owner on Feb 21, 2023. It is now read-only.

Hope to change as Primary key model #42

Open
cdmalcl opened this issue Feb 28, 2016 · 1 comment
Open

Hope to change as Primary key model #42

cdmalcl opened this issue Feb 28, 2016 · 1 comment

Comments

@cdmalcl
Copy link

cdmalcl commented Feb 28, 2016

Hope to change as a primary key model, query and more efficient operation of some.
Can be directly inserted data, otherwise we must first find, and then add or update.

@cdmalcl
Copy link
Author

cdmalcl commented Feb 28, 2016

eg:
{ prefix_pk1_value:value+sort, prefix_pk2_value:value+sort, ... }

older:
[{_id:1, id:1, testkey:"testval"}, {_id:2, id:2, testkey:"testval"}, ...]
to:
{rns_id_1:{_sort:1, id:1, testkey:"testval"}, rns_id_2:{_sort:2, id:2, testkey:"testval"}, ...}

we can set prefix to empty. The default is _id_1,_id_2,id...,
DB.foo.find({ where: { id: 1 } }).then(resp => do something));

That is, "Primary key" model to query when the key-name is 'id'.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant