all repos — min @ 946beb6e1b99280a1b8f2304218211f6b1d2085c

A small but practical concatenative programming language.

Renamed dstore to store.
h3rald h3rald@h3rald.com
Sun, 29 Sep 2024 10:56:22 +0200
commit

946beb6e1b99280a1b8f2304218211f6b1d2085c

parent

f5c37b9b51e9a4784537995f0a9ac1ccbb73d02a

M minpkg/core/stdlib.nimminpkg/core/stdlib.nim

@@ -17,7 +17,7 @@ min_dict,

min_time, min_sys, min_io, - min_dstore, + min_store, min_fs, min_xml, min_http,

@@ -42,7 +42,7 @@ i.dict_module

i.time_module i.sys_module i.fs_module - i.dstore_module + i.store_module i.io_module i.crypto_module i.net_module
M minpkg/lib/min_dstore.nimminpkg/lib/min_store.nim

@@ -8,7 +8,7 @@ ../core/value,

../core/interpreter, ../core/utils -proc dstore_module*(i: In) = +proc store_module*(i: In) = let def = i.define() def.symbol("init") do (i: In):

@@ -138,4 +138,4 @@ var cll = i.dget(data, collection)

i.ddel(cll, id) i.push ds - def.finalize("dstore") + def.finalize("store")
M next-release.mdnext-release.md

@@ -42,16 +42,16 @@ - **dict** module: renamed **ddup** to **dict.dup**

- **dict** module: renamed **dpick** to **dict.pick** - **dict** module: renamed **dtype** to **dict.type** - The **sys** module is no longer imported. -- The **dstore** module is no longer imported. -- **dstore** mdule: renamed **dsinit** to **dstore.init** -- **dstore** mdule: renamed **dsget** to **dstore.get** -- **dstore** mdule: renamed **dshas?** to **dstore.has?** -- **dstore** mdule: renamed **dsput** to **dstore.put** -- **dstore** mdule: renamed **dspost** to **dstore.post** -- **dstore** mdule: renamed **dsdelete** to **dstore.delete** -- **dstore** mdule: renamed **dsquery** to **dstore.query** -- **dstore** mdule: renamed **dswrite** to **dstore.write** -- **dstore** mdule: renamed **dsread** to **dstore.read** +- The **dstore** module has been renamed to **store**, and is no longer imported. +- **store** mdule: renamed **dsinit** to **store.init** +- **store** mdule: renamed **dsget** to **store.get** +- **store** mdule: renamed **dshas?** to **store.has?** +- **store** mdule: renamed **dsput** to **store.put** +- **store** mdule: renamed **dspost** to **store.post** +- **store** mdule: renamed **dsdelete** to **store.delete** +- **store** mdule: renamed **dsquery** to **store.query** +- **store** mdule: renamed **dswrite** to **store.write** +- **store** mdule: renamed **dsread** to **store.read**
M site/contents/reference.mdsite/contents/reference.md

@@ -14,7 +14,7 @@ {#link-module||seq#}

: Defines operators for quotations, like map, filter, reduce, etc. {#link-module||dict#} : Defines operators for dictionaries, like dget, ddup, dset, etc. -{#link-module||dstore#} +{#link-module||store#} : Provides support for simple, persistent, in-memory JSON stores. {#link-module||io#} : Provides operators for reading and writing files as well as printing to STDOUT and reading from STDIN.

@@ -134,7 +134,7 @@ my-symbol :val

;rawval } {{dstore}} -: A datastore dictionary that must be created through the {#link-operator||dstore||dsinit#} or {#link-operator||dstore||dsread#} operator: +: A datastore dictionary that must be created through the {#link-operator||store||init#} or {#link-operator||store||read#} operator: { {} :data
M tests/all.mintests/all.min

@@ -10,7 +10,7 @@ "Total Sigils: $1" (total-sigils) => % puts!

"=" 70 repeat puts! 'crypto load 'dict load -'dstore load +'store load 'fs load 'global load 'math load
D tests/dstore.min

@@ -1,37 +0,0 @@

-'min-test require :test -;;; - -"dstore" test.describe - - ("dstore.json" dstore.init type "dict:datastore" ==) test.assert - - ( - "dstore.json" dstore.read :ds - ds "tests" - {} - 1 "test1" dict.set - 2 "test2" dict.set - dstore.post dstore.write - "tests" (stack.pop true) dstore.query size 1 == - ) test.assert - - ( - "dstore.json" dstore.read :ds - ds "tests/aaa" - {} - 1 "test1" dict.set - 3 "test3" dict.set - dstore.put dstore.write - "tests" ("test1" dict.get 1 ==) dstore.query size 2 == - ) test.assert - - ( - "dstore.json" dstore.read :ds - ds "tests/aaa" dstore.delete - "tests" ("id" dict.get "aaa" ==) dstore.query size 0 == - ) test.assert - - "dstore.json" sys.rm - - test.report - stack.clear
A tests/store.min

@@ -0,0 +1,37 @@

+'min-test require :test +;;; + +"store" test.describe + + ("store.json" store.init type "dict:datastore" ==) test.assert + + ( + "store.json" store.read :ds + ds "tests" + {} + 1 "test1" dict.set + 2 "test2" dict.set + store.post store.write + "tests" (stack.pop true) store.query size 1 == + ) test.assert + + ( + "store.json" store.read :ds + ds "tests/aaa" + {} + 1 "test1" dict.set + 3 "test3" dict.set + store.put store.write + "tests" ("test1" dict.get 1 ==) store.query size 2 == + ) test.assert + + ( + "store.json" store.read :ds + ds "tests/aaa" store.delete + "tests" ("id" dict.get "aaa" ==) store.query size 0 == + ) test.assert + + "store.json" sys.rm + + test.report + stack.clear