Raymond Feng
1963ea9fb1
Use ModelDefinition to access model name/properties/settings
2013-10-02 15:18:50 -07:00
Raymond Feng
fad6ee5e1d
Refactor/cleanup the data source juggler implementation
...
- Add a ModelDefinition class to encapsulate the model schema handling
- Add a Connector class as the base class for connector implementations
- Optimize attachTo and mixin
- Rename some properties/methods
2013-10-01 22:14:21 -07:00
Raymond Feng
92cd7d15a6
Add a ModelDefinition class
2013-09-20 22:22:49 -07:00
Raymond Feng
1575c87caf
Make sure schemaless property value is honored over __data
2013-09-18 16:34:52 -07:00
Raymond Feng
bf223320ea
Allow connector to report failure during initialization
2013-09-12 13:32:53 -07:00
Raymond Feng
f4d62e54e6
Add error stack trace for ValidationError
...
The issue was initially reported by SLA-370.
2013-09-09 10:12:12 -07:00
Raymond Feng
21e6fddf1a
Check the filter param to make sure we have a default value
...
sls-sample-app is failing if we hit http://localhost:3000/locations/findOne
In this case, a undefined param is passed in.
The fix now sets it to {} if the value is undefined/null
2013-09-06 13:42:12 -07:00
Raymond Feng
038f30cb95
Fix the conflicts between MongoDB _id & juggler's internal prefix
2013-08-30 16:59:17 -07:00
Raymond Feng
bfcd850dfe
Merge pull request #8 from strongloop/id-fix
...
Allows custom name of the id property for the memory connector
2013-08-30 10:59:50 -07:00
Raymond Feng
84a40cc1c6
Merge pull request #7 from strongloop/SLA-422
...
Mark id arguments to be required
2013-08-30 10:49:16 -07:00
Raymond Feng
f71dc8fe39
Set default value
2013-08-28 21:53:55 -07:00
Raymond Feng
c2eb1f55f0
Fix the property population for schemaless models
2013-08-28 21:49:05 -07:00
Raymond Feng
0866f33cec
Check the existence of id
2013-08-28 21:39:59 -07:00
Raymond Feng
6f111f8122
Allows custom name of the id property for the memory connector
2013-08-27 22:32:01 -07:00
Raymond Feng
cb00aad473
Mark id arguments to be required
2013-08-27 22:03:59 -07:00
Raymond Feng
59841a04a8
Set strict to false by default for non-relational data sources
2013-08-26 13:38:24 -07:00
Raymond Feng
ecc142b4d2
Disable remoting for reload
2013-08-26 10:54:26 -07:00
Raymond Feng
be15eabc36
Merge pull request #5 from strongloop/memory-connector-ids
...
Track the greatest id to prevent records from being overriden
2013-08-26 10:52:13 -07:00
Raymond Feng
7234c9822c
Add descriptions for remote method paramters
2013-08-23 17:04:08 -07:00
Raymond Feng
43a5398792
Fix the remote method descriptions
2013-08-23 14:08:47 -07:00
Raymond Feng
bede7ab499
Track the greatest id to prevent records from being overriden
2013-08-22 16:44:02 -07:00
Raymond Feng
6407098126
Update descriptions to use data source
2013-08-22 13:30:13 -07:00
Raymond Feng
a1e4457794
Refactor the shared method declaration and add descriptions
2013-08-22 12:24:02 -07:00
Raymond Feng
cf07563414
Fix the message
2013-08-20 16:14:27 -07:00
Raymond Feng
0fd167a41d
Use DEBUG or NODE_DEBUG env to override the debug flag
2013-08-18 23:11:32 -07:00
Raymond Feng
9482d3c7de
Fix the where option for delete
2013-08-18 10:58:53 -07:00
Raymond Feng
705a1fc2c9
Update the remote methods
2013-08-16 16:44:31 -07:00
Ritchie Martori
d5ab26509a
Merge pull request #1 from strongloop/id-fix
...
Fix the id references to allow custom name other than 'id'
2013-08-16 14:46:50 -07:00
Raymond Feng
29c95a4ec7
Remove the deletion of property type as the instane is shared by the base model class
2013-08-15 16:50:50 -07:00
Raymond Feng
281cc38017
Fix the id references to allow custom name other than 'id'
2013-08-14 23:14:44 -07:00
Raymond Feng
8aec0a3b47
Add missing declaration
2013-08-14 17:32:38 -07:00
Raymond Feng
6c0f2483b3
Update jsdocs
2013-08-13 09:37:27 -07:00
Raymond Feng
2e20df2dd3
Add docs.json and jsdocs
2013-08-09 15:16:32 -07:00
Raymond Feng
d3bf5c20ac
Add an optional models argument to automigrate/autoupdate
2013-08-08 08:30:26 -07:00
Raymond Feng
0a5c0ff77d
Refactor introspection to ModelBuilder
2013-08-07 14:51:32 -07:00
Raymond Feng
f3443959a1
Rename 'loopback-data' to 'loopback-datasource-juggler'
2013-07-30 14:10:03 -07:00
Raymond Feng
7ce6cfc9ab
Allows connector property to be a string
2013-07-30 10:52:30 -07:00
Ritchie Martori
08505d1e78
Add required validation
2013-07-28 13:17:12 -07:00
Raymond Feng
57c181c8b9
Bring up json object introspection to build models
2013-07-26 13:06:43 -07:00
Raymond Feng
0e4162af2a
Fix the constructor
2013-07-25 22:39:16 -07:00
Raymond Feng
1109f671da
Add precision/scale for sync discovery
2013-07-25 15:20:19 -07:00
Raymond Feng
dcada03c43
Add precision/scale
2013-07-25 15:06:00 -07:00
Raymond Feng
630aad2071
Refactor types out
2013-07-25 07:48:31 -07:00
Raymond Feng
adb724e3b2
Fix the ref to dataSource
2013-07-24 22:58:57 -07:00
Raymond Feng
9b422752a6
Allows non-strict mode to accept unknown properties
2013-07-24 22:58:57 -07:00
Raymond Feng
96787ad25f
Fix id references
2013-07-24 22:58:57 -07:00
Ritchie
5bf2d1ff23
Add root true to remote methods
2013-07-24 17:21:35 -07:00
Raymond Feng
752aedb80d
Rename adapters to connectors
2013-07-23 14:40:44 -07:00
Raymond Feng
ac76666b7b
Set up connector from the data source
2013-07-23 13:19:35 -07:00
Raymond Feng
1970c99424
Rename dataSource() to avoid conflicts with the property
2013-07-23 12:44:04 -07:00
Raymond Feng
4df5a02676
Fix schema references
2013-07-23 12:16:12 -07:00
Raymond Feng
9b169efc8c
Set up connector/adapter when postInit is not called
2013-07-23 12:05:08 -07:00
Raymond Feng
6af4b1ba2f
More renames: schema -> dataSource, adapter -> connector
2013-07-23 11:16:43 -07:00
Raymond Feng
127fb32d02
Add the id arg
2013-07-22 09:57:55 -07:00
Raymond Feng
b7f7f71b15
Add static deleteById
2013-07-22 09:42:09 -07:00
Raymond Feng
588b328e62
Fix the model prop lookup
2013-07-21 17:27:31 -07:00
Ritchie Martori
22db369fb8
Allow queries to filter fields
2013-07-17 09:05:37 -07:00
Ritchie Martori
d4ca20c01a
Add filter.fields support to dao and memory connector
2013-07-16 17:53:52 -07:00
Raymond Feng
be21815e7b
Rename jugglingdb to loopback-data
2013-07-16 11:59:53 -07:00
Ritchie Martori
a4247ad59f
Remove updateAttribute as remote method
2013-07-15 19:44:29 -07:00
Ritchie Martori
0aa0cabdd4
Fix inherit bug
2013-07-15 18:22:49 -07:00
Ritchie Martori
2de55df939
Fix extend by using util.inherits
2013-07-15 10:44:34 -07:00
Raymond Feng
12c28ce363
Fix typos
2013-07-15 10:38:54 -07:00
Raymond Feng
ef671825ff
Only flatten array/object for relational DBs
2013-07-12 19:10:42 -07:00
Raymond Feng
8e01e17bdb
Add support for nesting objects with an array
2013-07-12 18:59:43 -07:00
Raymond Feng
09ab8356b8
Fix the array data population
2013-07-12 12:36:14 -07:00
Raymond Feng
296b258f35
Add http mapping for create/updateAttributes methods
2013-07-11 16:49:18 -07:00
Raymond Feng
aa5bba3bac
Fix the ref to getSchemaType
2013-07-11 16:04:28 -07:00
Raymond Feng
194f68468a
Add support for nesting schema
2013-07-11 14:24:47 -07:00
Raymond Feng
049f4c0c38
Add Object type
2013-07-11 11:04:31 -07:00
Raymond Feng
12199ad779
Add support to use adapter constructor for initialization
2013-07-11 09:55:26 -07:00
Ritchie Martori
7684fe2946
Change default create method from save to create for remoting
2013-07-02 20:28:00 -07:00
Ritchie Martori
c8bfc5802a
Add event emitter methods to models.
2013-07-02 14:59:24 -07:00
Ritchie Martori
522291bf08
Add support for extending models
2013-07-01 16:49:43 -07:00
Ritchie Martori
dbd5efed50
Revert adapter serialization. Remove geo point distance indicator.
2013-07-01 13:16:51 -07:00
Ritchie Martori
e6a88ac254
Add properties to ModelClass during definition
2013-06-27 18:25:42 -07:00
Ritchie
ce63ef9ac2
Fix global leak and incorrect var
2013-06-27 12:21:31 -07:00
Raymond Feng
64da1d441a
Add alias to destroy/destroyAll
2013-06-25 21:08:34 -07:00
Raymond Feng
0ae61d3b53
Alias destroy/destroyAll
2013-06-25 20:36:08 -07:00
Ritchie Martori
6cb53e5001
Add in memory geo filtering.
2013-06-25 20:31:00 -07:00
Ritchie Martori
d730aab674
Move geo filter creation into reusable module.
2013-06-24 16:38:50 -07:00
Ritchie Martori
572445de39
Rename long to lng
2013-06-24 15:32:34 -07:00
Ritchie Martori
6856ff7254
Add geo filtering for memory adapter
2013-06-24 15:21:59 -07:00
Ritchie Martori
008b406dd7
model.find => model.findById, model.all => model.find
2013-06-24 12:42:58 -07:00
Ritchie Martori
ff37cc001a
Fix incorrect variable name in updateAttributes
2013-06-21 15:01:40 -07:00
Ritchie Martori
0a3e642c9e
Fix memory adapter updateAttributes issue.
...
Callback with an error if an id was not provided or if a model was not
found by that id.
2013-06-21 14:56:23 -07:00
Raymond Feng
4940187663
Fix the schema building
2013-06-21 14:15:24 -07:00
Raymond Feng
3830f0bfda
Normalize the schema definition
2013-06-21 14:04:24 -07:00
Raymond Feng
a6ad39ba0f
Update the discover apis to take options
2013-06-20 15:51:24 -07:00
Michael Schoonmaker
bc62d28b12
Removed a stray log.
2013-06-19 13:15:57 -07:00
Raymond Feng
3b731b1a12
Move the _operations={} up
2013-06-18 14:44:30 -07:00
Raymond Feng
72e8e7230f
Work around the JDB test coverage tool limitation. See https://github.com/1602/semicov
2013-06-18 12:07:13 -07:00
Raymond Feng
b3e98f0c6f
Pass in the options
2013-06-18 11:50:13 -07:00
Ritchie
502b0512d3
Support string types when defining properties
2013-06-17 16:42:13 -07:00
Ritchie
d442c40f25
Rename discoverModels to discoverModelDefinitions
2013-06-17 11:43:20 -07:00
Ritchie
25f2920e95
Handle separate settings and adapter objects
2013-06-17 07:54:51 -07:00
Ritchie
864135e0e4
Remove console log
2013-06-17 07:39:31 -07:00
Ritchie
473dd794ef
Fix missing settings
2013-06-14 14:22:51 -07:00
Ritchie
bf83a76eae
Fix missing connector alias
2013-06-14 13:56:44 -07:00
Ritchie
b78050410d
Merge branch 'asteroid-0.7'
...
Conflicts:
lib/datasource.js
2013-06-13 16:27:31 -07:00