Skip to content
This repository was archived by the owner on Jul 3, 2024. It is now read-only.

Commit 6dd6673

Browse files
Dropping the deletion statements so the DB remains in memory
Updating docs Exposing the version
1 parent 72ac8f1 commit 6dd6673

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
*v0.4* (2012-01-06)
2+
3+
* Dropping the deletion statements so the DB remains in memory
4+
15
*v0.3* (2011-11-04)
26

37
* Added better garbage collection & memory management

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ The API is still developing, but using LocalStorageDB is pretty simple:
1818

1919
## API
2020

21+
__`version` - the library version
22+
23+
2124
__`CREATE()` - creates a new table__
2225

2326
You can define your tables by supplying a name for the table and a object-based definition (type checking is coming…).

src/LocalStorageDB.js

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Function: LocalStorageDB()
33
Author: Aaron Gustafson (aaron at easy-designs dot net)
44
Creation Date: 2011-10-03
5-
Version: 0.3
5+
Version: 0.4
66
Homepage: http://github.com/easy-designs/LocalStorageDB.js
77
License: MIT License (see homepage)
88
------------------------------------------------------------------------------*/
@@ -19,7 +19,8 @@ License: MIT License (see homepage)
1919
*/
2020
function LocalStorageDB( name )
2121
{
22-
22+
this.version = '0.4';
23+
2324
var
2425
UNDEFINED,
2526
TRUE = true,
@@ -388,8 +389,6 @@ License: MIT License (see homepage)
388389
{
389390
// cache the table
390391
cache( table );
391-
// garbage collection
392-
delete DB[table];
393392
}
394393

395394
// garbage collection
@@ -434,8 +433,6 @@ License: MIT License (see homepage)
434433
DB[table].index = 0;
435434
DB[table].data = [];
436435
cache( table );
437-
// garbage collection
438-
delete DB[table];
439436
}
440437
else
441438
{
@@ -532,7 +529,6 @@ License: MIT License (see homepage)
532529
}
533530
cache( table );
534531
// garbage collection
535-
delete DB[table];
536532
data = NULL;
537533
}
538534
else
@@ -651,7 +647,6 @@ License: MIT License (see homepage)
651647
}
652648
cache( table );
653649
// garbage collection
654-
delete DB[table];
655650
o_data = n_data = NULL;
656651
}
657652
else
@@ -688,13 +683,9 @@ License: MIT License (see homepage)
688683
AFFECTED_ROWS++;
689684
});
690685
cache( table );
691-
// garbage collection
692-
delete DB[table];
693686
}
694687
};
695688

696-
697-
698689
// load it up!
699690
init();
700691
}

0 commit comments

Comments
 (0)