-
Notifications
You must be signed in to change notification settings - Fork 4
/
CHANGELOG
262 lines (198 loc) · 8.91 KB
/
CHANGELOG
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
# NDDB change log
## 3.0.2
- Index updates TRUE by default.
## 3.0.1
- Readme updated.
## 3.0.0
- Code for file system operations refactored.
- New method: NDDB.stream() replaces keepUpdated flag.
- New method: NDDB.journal() streams all database operations.
- New method: NDDB.importJournal() restores a db, replaying all operations.
- New methods: NDDB.loadDir(), NDDB.loadDirSync() load all files in a directory.
- New static method: NDDB.db() creates a new database.
- New static method: NDDB.convert() NDDB.convertSync() convert from a format to another.
- New static method: NDDB.load|loadSync|save|saveSync|loadDir|loadDirSync
- New format: NDJSON.
- Dropped: keepUpdated flag.
## 2.0.0
- `#NDDB.setWD` is applied to all views and hashes.
- New emit events: 'setwd', 'load', 'save'.
- Improved CSV saving: keepUpdated, updatesOnly, updateDelay, flatten,
flattenByGroup options.
- Cache for all CSV files.
- `#NDDB.tag` default value is last element in db (before nddb_pointer).
- `#NDDB.stringify` fetches query, so saving in JSON format is applied to current selection (consistent with csv format).
- Saving option `flag` deprecated, use `flags instead.
- Experimental: __parentDb property added to Hashes and Views.
- Experimental: `#NDDB.on` accepts third parameter for hooks that are shared with child databases.
## 1.19.1
- Path join of working directory.
## 1.19.0
- Improved autodetect of csv line breaks.
## 1.18.1
- Updated package.json.
## 1.18.0
- Default line break is set to os.EOL.
## 1.17.0
- Minor bug fixes.
## 1.16.0
- Events "insert", "remove", "update" receive the ordinal position of the item in the database as last parameter.
- Update rules can be passed to insert and update methods.
- `#NDDB.random(N)` selects N random items and breeds a new DB.
- CSV saving automatically takes care of objects. The level of nestedness can be controlled with the option `.objectLevel`.
## 1.15.1
- Fixed bug that was not keeping updated the keys array of the NDDBIndex upon removal of items from index.
## 1.15.0
- `#.setWD()` and `#.getWD() to set and get current working directory.
- Event listeners that returns FALSE block the operation they are listening to, and also skip successive event listeners on the same event.
## 1.14.1
- Default functions for methods index, hash, and view.
## 1.13.0
- Speeded-up method `#NDDBIndex.getAllKeys()`.
## 1.12.0
- Fix bug loading csv files: unquoted numbers are parsed as number when loading.
## 1.11.0
- `#.split()` accepts two parameters: the level of recursion, and whether to use use the position inside the array ar key.
- `#.clear()` does not require a confirmation parameter any longer.
- `#.clear()` sets previous indexes, hashes or views to NULL, instead of deleting them.
## 1.10.0
- Improved saving to CSV, headers option can be a function, and adapter parameters can be strings.
## 1.9.0
- Loading from CSV correctly handles unescaped separators in quotes.
## 1.8.0
- Removed prepublish script that was causing errors in some systems.
## 1.7.1
- JSUS.in_array -> JSUS.inArray
## 1.7.0
- Nested views and hashes do not copy over hooks (hooks are called only once per insert on main db).
## 1.6.0
- Fixed overflow bug saving large CSV files.
## 1.5.1
- Fixed bug execution callback on async load of JSON files.
## 1.5.0
- Fixed bug for loading CSV files in Windows.
## 1.4.1
- Rewrote load and loadSync for .json and csv
## 1.2.0
- Cleanup and optimizations
## 1.1.0
- Added "use stricts"
- Fixed leaks of variables db, and df
- Node 0.12 compatible
## 1.0.1
- Better check for availability of Object.defineProperty method (IE8, IE9).
- JSUS needs to be available when NDDB is loaded, and not only at constructor time.
## 1.0.0
- Depracated `#execute()` method, `#fetch()` does it automatically (simpler API, and faster)
- Added `.lastSelection` property
- Fixed bug on updating views and hashes on deleted or modified items
- Fixed bug on selecting items with properties of different types.
- Improved documentation.
- Minor fixes.
## 0.9.8
- `length` property removed completely because it feature detection failed in old browser
- Cosmetics changes
## 0.9.7
- Bug-fix: filter `!=` works correctly.
- Any malformed query will throw an error.
## 0.9.6
- Bug-fix: `#stringify()` failed to indent output.
- Shared options are removed from `this.__options` and kept just in `this.__shared`.
## 0.9.5
- Operators -> Filters. `#addFilter()` can add a new filter.
- `LIKE`, and `iLIKE` filters added.
- The symbol `*` can be used to select on any property of the object.
- `#select()` accepts an array containing the name of the properties that will be used for the selection.
- `#shuffle()` by default returns a new object, and does not alter the order of the elements in the database. A parameter can control it.
- More efficient updating of elements in the index
- Options `log` and `logCtx` are not cloned, by copied by reference. This avoid trying copying potential cyclical structures.
## 0.9.2
- `#remove()` -> `#removeAllEntries()`
- `#NDDBIndex.pop() -> #NDDBIndex.remove()` pop is deprecated now
## 0.9.1
- On request, views, and hashes are now hybrid. They are NDDB object, but they tries to load all current settings, avoiding to creating infinite loops
- `#cloneSettings()` accepts a leaveOut parameter
- Empty hash objects are created by the constructor, if an hash function is specified
## 0.9.0
- Fixed bug with views and hashs created within constructor of inheriting class
- `#hash()` and `#view()` always creates objects of type NDDB (previously using the constructor of the inheriting class, if any)
- Fixed bug in loading from browser storage
- Better error messages
- Code for Node.js and browser clearly separated
- NDDB methods throw errors instead of returning false if input parameters are
incorrect
## 0.8.10
- Support for shared objects across all breeded instances of NDDB
- NDDB.log -> this.log
- `#initLog()` to execute the log function in the proper context
- Fixed indexes and views not appearing on empty DBs
## 0.8.6
- Support for property names containing dots
## 0.8.5
- `#loadCSV`: load the content of a csv file into the database
- Minor fixes
## 0.8.4
- NDDBIndexes: `#getAllKeys()` and `#getAllKeyElements`
- Integration with updated version of Shelf.js
- Minor fixes
## 0.8.0
- New faster and more powerful indexing engine
- Indexes are now objects with own methods: `#get()`, `#update()`, `#pop()`, `#size()`
- Support for multiple _views_ on the database
- `#comparator()` becomes `#getComparator()`, and `#compare()` becomes `#comparator()`
- Deprecated `c`,`h`,`i`; use human readable `comparator`, `hash`, `index` from now on!
- `#current()` replaces the old `#get()`
- `#get()` always returns the element at the specified ordinal position in the database
- Callback functions of hash and index functions must always be specified
- Hash functions creates NDDB instances of constructor
## 0.7.2
- `#selexec()` shorthand for `select().execute()`
- Fixed bug on emit('update')
- `#tag()` returns the tagged element
- `#clear()` removes all volatile data, not just the entries in the database
- Minor doc improvements
## 0.7.0
- More efficient selector engine.
- Select queries can be chained with and, and or methods
- Select queries are executed with an execute method
- Objects are not maskeraded at insertation (no hidden .nddbid property injected)
- Remove method does not remove the elements in parent database
- Constructor changed, no parent parameter
## 0.6.0
- fetch accepts no arguments
- fetchValues returns an object containing all the values in the grouped by property
- fetchSubObj
- fetchArray and fetchKeyArray operate only on the first level, and objects in properties are not further flattened
- fetchArray, fetchKeyArray, and fetchValues accept either a string or an array of strings as key-selector parameter
## 0.5.8
- Serialization of functions, null and undefined values
- Removed eval from select queries
- Travis-ci continous integration
- Minor bug fixing
## 0.5.0
- Support for events: 'remove', 'insert'
- NDDB.index(): provides fast access to objects
- NDDB.tag(): accepts also objects
## 0.4.0
- IE compatibility
- Bug fixing
## 0.3.6
- Bug fixing
- NDDB.save beautifies the output by default
- Post install scripts build the libraries
## 0.3.0
- NDDB.skim() and NDDB.keep()
- Full test coverage
- Make file in bin directory
- Custom builds
- Bug fixing
## 0.2.5
- NDDB.distinct() + test
- Support for cyclic objects when saving the database to file
- NDDB.stddev()
- Bug fixing
- More tests
## 0.2
- Introduced indexing. Indexes are created with NDDB.h() or the alias NDDB.hash()
- NDDB.set() was already deprecated and it has been removed. NDDB.c() or the alias NDDB.compare() should be used instead.
- NDDB.init() can sets the configuration of the database