dnhydb 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dnhydb-0.2.0/Cargo.lock +188 -0
- dnhydb-0.2.0/Cargo.toml +26 -0
- dnhydb-0.2.0/LICENSE.md +167 -0
- dnhydb-0.2.0/PKG-INFO +197 -0
- dnhydb-0.2.0/README.md +168 -0
- dnhydb-0.2.0/THIRD-PARTY-LICENSES.txt +360 -0
- dnhydb-0.2.0/crates/dnhydb-core/Cargo.toml +21 -0
- dnhydb-0.2.0/crates/dnhydb-core/LICENSE.md +167 -0
- dnhydb-0.2.0/crates/dnhydb-core/examples/bench.rs +259 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/address.rs +280 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/codec.rs +483 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/buffer.rs +256 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/catalog.rs +339 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/columns.rs +316 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/dense.rs +730 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/index.rs +383 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/interval.rs +165 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/iter.rs +331 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/maint.rs +672 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/meta.rs +292 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/mod.rs +1494 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/read.rs +90 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/sparse.rs +363 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/db/vindex.rs +499 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/error.rs +94 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/format.rs +207 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/lib.rs +53 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/platform.rs +307 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/schema.rs +411 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/storage.rs +232 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/u256.rs +260 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/val.rs +768 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/varint.rs +207 -0
- dnhydb-0.2.0/crates/dnhydb-core/src/zlib.rs +25 -0
- dnhydb-0.2.0/crates/dnhydb-core/tests/common/mod.rs +35 -0
- dnhydb-0.2.0/crates/dnhydb-core/tests/core.rs +579 -0
- dnhydb-0.2.0/crates/dnhydb-core/tests/model.rs +285 -0
- dnhydb-0.2.0/crates/dnhydb-core/tests/multiprocess.rs +202 -0
- dnhydb-0.2.0/crates/dnhydb-core/tests/robustness.rs +180 -0
- dnhydb-0.2.0/crates/dnhydb-py/Cargo.toml +16 -0
- dnhydb-0.2.0/crates/dnhydb-py/LICENSE.md +167 -0
- dnhydb-0.2.0/crates/dnhydb-py/src/conv.rs +231 -0
- dnhydb-0.2.0/crates/dnhydb-py/src/exceptions.rs +13 -0
- dnhydb-0.2.0/crates/dnhydb-py/src/lib.rs +1064 -0
- dnhydb-0.2.0/crates/dnhydb-py/src/numpy_io.rs +174 -0
- dnhydb-0.2.0/pyproject.toml +44 -0
- dnhydb-0.2.0/python/dnhydb/__init__.py +73 -0
- dnhydb-0.2.0/python/dnhydb/__main__.py +3 -0
- dnhydb-0.2.0/python/dnhydb/cli.py +130 -0
dnhydb-0.2.0/Cargo.lock
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "adler2"
|
|
7
|
+
version = "2.0.1"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "cfg-if"
|
|
13
|
+
version = "1.0.5"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "crc32fast"
|
|
19
|
+
version = "1.5.2"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78"
|
|
22
|
+
dependencies = [
|
|
23
|
+
"cfg-if",
|
|
24
|
+
]
|
|
25
|
+
|
|
26
|
+
[[package]]
|
|
27
|
+
name = "dnhydb-core"
|
|
28
|
+
version = "0.2.0"
|
|
29
|
+
dependencies = [
|
|
30
|
+
"crc32fast",
|
|
31
|
+
"libc",
|
|
32
|
+
"miniz_oxide",
|
|
33
|
+
"windows-sys",
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
[[package]]
|
|
37
|
+
name = "dnhydb-py"
|
|
38
|
+
version = "0.2.0"
|
|
39
|
+
dependencies = [
|
|
40
|
+
"dnhydb-core",
|
|
41
|
+
"pyo3",
|
|
42
|
+
]
|
|
43
|
+
|
|
44
|
+
[[package]]
|
|
45
|
+
name = "heck"
|
|
46
|
+
version = "0.5.0"
|
|
47
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
48
|
+
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
49
|
+
|
|
50
|
+
[[package]]
|
|
51
|
+
name = "libc"
|
|
52
|
+
version = "0.2.190"
|
|
53
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
+
checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
|
|
55
|
+
|
|
56
|
+
[[package]]
|
|
57
|
+
name = "miniz_oxide"
|
|
58
|
+
version = "0.8.9"
|
|
59
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
60
|
+
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
|
61
|
+
dependencies = [
|
|
62
|
+
"adler2",
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
[[package]]
|
|
66
|
+
name = "once_cell"
|
|
67
|
+
version = "1.21.4"
|
|
68
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
69
|
+
checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
|
|
70
|
+
|
|
71
|
+
[[package]]
|
|
72
|
+
name = "portable-atomic"
|
|
73
|
+
version = "1.15.0"
|
|
74
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
75
|
+
checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
|
|
76
|
+
|
|
77
|
+
[[package]]
|
|
78
|
+
name = "proc-macro2"
|
|
79
|
+
version = "1.0.107"
|
|
80
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
81
|
+
checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
|
|
82
|
+
dependencies = [
|
|
83
|
+
"unicode-ident",
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
[[package]]
|
|
87
|
+
name = "pyo3"
|
|
88
|
+
version = "0.29.3"
|
|
89
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
90
|
+
checksum = "700d18fa267b73b9b521fd7e13580e2f446916f176cacee1ab63fcc8191f1655"
|
|
91
|
+
dependencies = [
|
|
92
|
+
"libc",
|
|
93
|
+
"once_cell",
|
|
94
|
+
"portable-atomic",
|
|
95
|
+
"pyo3-build-config",
|
|
96
|
+
"pyo3-ffi",
|
|
97
|
+
"pyo3-macros",
|
|
98
|
+
]
|
|
99
|
+
|
|
100
|
+
[[package]]
|
|
101
|
+
name = "pyo3-build-config"
|
|
102
|
+
version = "0.29.3"
|
|
103
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
104
|
+
checksum = "7b3fc0c4d08f6bb10e71fe39dfb9e2f59c6eb6854e22ec8092f50c69a4499adb"
|
|
105
|
+
dependencies = [
|
|
106
|
+
"target-lexicon",
|
|
107
|
+
]
|
|
108
|
+
|
|
109
|
+
[[package]]
|
|
110
|
+
name = "pyo3-ffi"
|
|
111
|
+
version = "0.29.3"
|
|
112
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
113
|
+
checksum = "dfc0b8e19df29aad7086cf977bb0c2a2f143e30567eb113e9cf72b62ca698330"
|
|
114
|
+
dependencies = [
|
|
115
|
+
"libc",
|
|
116
|
+
"pyo3-build-config",
|
|
117
|
+
]
|
|
118
|
+
|
|
119
|
+
[[package]]
|
|
120
|
+
name = "pyo3-macros"
|
|
121
|
+
version = "0.29.3"
|
|
122
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
123
|
+
checksum = "6100e8a4b5eba53afaa5ed078364851a0b2499c553a44c31026b929049b49dc6"
|
|
124
|
+
dependencies = [
|
|
125
|
+
"proc-macro2",
|
|
126
|
+
"pyo3-macros-backend",
|
|
127
|
+
"quote",
|
|
128
|
+
"syn",
|
|
129
|
+
]
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "pyo3-macros-backend"
|
|
133
|
+
version = "0.29.3"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "6143877a16e82b5a727b7127ff4cd86858a24a28d745d72f43e6f227c7b1bdb3"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"heck",
|
|
138
|
+
"proc-macro2",
|
|
139
|
+
"quote",
|
|
140
|
+
"syn",
|
|
141
|
+
]
|
|
142
|
+
|
|
143
|
+
[[package]]
|
|
144
|
+
name = "quote"
|
|
145
|
+
version = "1.0.47"
|
|
146
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
147
|
+
checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
|
|
148
|
+
dependencies = [
|
|
149
|
+
"proc-macro2",
|
|
150
|
+
]
|
|
151
|
+
|
|
152
|
+
[[package]]
|
|
153
|
+
name = "syn"
|
|
154
|
+
version = "2.0.119"
|
|
155
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
156
|
+
checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
|
|
157
|
+
dependencies = [
|
|
158
|
+
"proc-macro2",
|
|
159
|
+
"quote",
|
|
160
|
+
"unicode-ident",
|
|
161
|
+
]
|
|
162
|
+
|
|
163
|
+
[[package]]
|
|
164
|
+
name = "target-lexicon"
|
|
165
|
+
version = "0.13.5"
|
|
166
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
167
|
+
checksum = "adb6935a6f5c20170eeceb1a3835a49e12e19d792f6dd344ccc76a985ca5a6ca"
|
|
168
|
+
|
|
169
|
+
[[package]]
|
|
170
|
+
name = "unicode-ident"
|
|
171
|
+
version = "1.0.27"
|
|
172
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
173
|
+
checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
|
|
174
|
+
|
|
175
|
+
[[package]]
|
|
176
|
+
name = "windows-link"
|
|
177
|
+
version = "0.2.1"
|
|
178
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
180
|
+
|
|
181
|
+
[[package]]
|
|
182
|
+
name = "windows-sys"
|
|
183
|
+
version = "0.61.2"
|
|
184
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
185
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
186
|
+
dependencies = [
|
|
187
|
+
"windows-link",
|
|
188
|
+
]
|
dnhydb-0.2.0/Cargo.toml
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[workspace]
|
|
2
|
+
resolver = "3"
|
|
3
|
+
members = ["crates/dnhydb-core", "crates/dnhydb-py"]
|
|
4
|
+
|
|
5
|
+
[workspace.package]
|
|
6
|
+
version = "0.2.0"
|
|
7
|
+
edition = "2024"
|
|
8
|
+
authors = ["Achim Meissner <achim.meissner@nhydb.de>"]
|
|
9
|
+
license-file = "LICENSE.md"
|
|
10
|
+
publish = false
|
|
11
|
+
|
|
12
|
+
[workspace.dependencies]
|
|
13
|
+
crc32fast = "1.4"
|
|
14
|
+
miniz_oxide = "0.8"
|
|
15
|
+
libc = "0.2"
|
|
16
|
+
pyo3 = "0.29"
|
|
17
|
+
|
|
18
|
+
[profile.release]
|
|
19
|
+
opt-level = 3
|
|
20
|
+
lto = "fat"
|
|
21
|
+
codegen-units = 1
|
|
22
|
+
panic = "unwind"
|
|
23
|
+
debug = false
|
|
24
|
+
|
|
25
|
+
[profile.bench]
|
|
26
|
+
inherits = "release"
|
dnhydb-0.2.0/LICENSE.md
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
# NHyDB / dNHyDB Experimental Software License
|
|
2
|
+
|
|
3
|
+
**License Version 1.0 — 17 October 2026**
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 Achim Meissner. All rights reserved.
|
|
6
|
+
|
|
7
|
+
**Official website:** https://nhy-db.com
|
|
8
|
+
**Licensing contact:** achim.meissner@nhydb.de
|
|
9
|
+
|
|
10
|
+
**SOURCE-AVAILABLE SOFTWARE — NOT AN OPEN-SOURCE LICENSE**
|
|
11
|
+
|
|
12
|
+
This License governs both **NHyDB** and **dNHyDB** when distributed under these terms by the Licensor. Each is referred to below as a **Product**; together they are referred to as the **Software**. The same License text may be included unchanged in both repositories.
|
|
13
|
+
|
|
14
|
+
The Software is provided free of charge for limited experimental purposes only. **This License grants no right to use either Product in production.**
|
|
15
|
+
|
|
16
|
+
## 1. Definitions
|
|
17
|
+
|
|
18
|
+
**Licensor:** Achim Meissner, to the extent he owns or controls the rights being licensed.
|
|
19
|
+
|
|
20
|
+
**Licensee:** The individual or legal entity exercising the permissions of this License. When a Product is used for an organization, that organization is the Licensee; individual employees do not receive separate organizational evaluation periods.
|
|
21
|
+
|
|
22
|
+
**Software:** The relevant Product's code, binaries, and accompanying materials that the Licensor distributes under this License, including modifications made under its permissions. Independently licensed third-party components remain subject to their respective terms.
|
|
23
|
+
|
|
24
|
+
**Non-Production Use:** Internal, isolated testing, experimentation, evaluation, teaching, research, or development that does not operate, support, or form part of any live operational system and on which no real-world process relies.
|
|
25
|
+
|
|
26
|
+
**First Use:** The first actual execution or operation of the relevant Product by or for the Licensee, including running tests or an evaluation. Merely viewing or downloading source code does not count as First Use.
|
|
27
|
+
|
|
28
|
+
**Written Permission:** Express permission from the Licensor in durable written form, including email, identifying the additional permitted activity. Silence is not permission.
|
|
29
|
+
|
|
30
|
+
## 2. Limited license grant
|
|
31
|
+
|
|
32
|
+
Subject to compliance with this License, the Licensor grants the Licensee a non-exclusive, worldwide, non-transferable, royalty-free permission, for the applicable period in Section 3, to:
|
|
33
|
+
|
|
34
|
+
1. Download, inspect, build, execute, and test the Software for authorized Non-Production Use.
|
|
35
|
+
2. Make copies reasonably necessary for the Licensee's own authorized internal testing and for backups, without prejudice to mandatory statutory rights.
|
|
36
|
+
3. Modify the source code and create derivative experimental versions **for the Licensee's own internal Non-Production Use only**.
|
|
37
|
+
|
|
38
|
+
No sublicense, redistribution, third-party service provision, publication of modified versions, or Production Use is granted. Employees within the same legal entity may participate in its authorized internal tests. Separate entities, external contractors, clients, and other third parties do not acquire rights through the Licensee.
|
|
39
|
+
|
|
40
|
+
These permissions do not affect activities expressly allowed by mandatory law.
|
|
41
|
+
|
|
42
|
+
## 3. Categories and duration of free use
|
|
43
|
+
|
|
44
|
+
| Licensee / purpose | Free-use period | Permitted activity |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| **Private individuals** | **Unlimited** | Own private, non-commercial, strictly non-production experimentation, learning, and development |
|
|
47
|
+
| **Schools and universities — teaching** | **24 calendar months** | Internal non-production teaching, exercises, instruction, and educational development |
|
|
48
|
+
| **Non-commercial academic or scientific research** | **6 calendar months** | Internal non-production research and evaluation |
|
|
49
|
+
| **Businesses and other commercial organizations** | **3 calendar months** | **Exclusively their own internal, isolated, non-production tests and evaluation** |
|
|
50
|
+
|
|
51
|
+
The category is determined by the real Licensee and actual purpose, not by an individual's job title or a project's label. Research conducted by a commercial organization falls under its **three-month commercial evaluation period**. University teaching falls under the **24-month teaching period**; research conducted by that institution falls under the **six-month research period**, unless otherwise authorized. An employee or researcher cannot use the unlimited private permission to evade the restrictions applicable to an organization.
|
|
52
|
+
|
|
53
|
+
### 3.1 Start and calculation
|
|
54
|
+
|
|
55
|
+
A limited period begins on the date of **First Use** of the relevant Product by or on behalf of the Licensee and expires at the start of the corresponding calendar date after the applicable number of months (or at the start of the final calendar day if no corresponding date exists).
|
|
56
|
+
|
|
57
|
+
A period runs once per Licensee and per Product. A different employee, device, installation, project name, software modification, download, or later version **does not reset or extend** that Licensee's period for the same Product. There is no registration, telephone-home function, or technical license-expiration requirement under this License; compliance with the dates remains the Licensee's responsibility.
|
|
58
|
+
|
|
59
|
+
Extensions, cooperation arrangements, and other exceptions require **Written Permission** from the Licensor and may be free of charge or separately negotiated. No category grants Production Use, regardless of its duration.
|
|
60
|
+
|
|
61
|
+
## 4. Experimental prototype — strict prohibition of Production Use
|
|
62
|
+
|
|
63
|
+
**THE SOFTWARE IS AN EXPERIMENTAL RESEARCH AND DEVELOPMENT PROTOTYPE. IT IS NOT APPROVED, CERTIFIED, WARRANTED, OR REPRESENTED AS PRODUCTION-READY.**
|
|
64
|
+
|
|
65
|
+
**PRODUCTION USE IS EXPRESSLY PROHIBITED UNDER THIS LICENSE IN ALL CIRCUMSTANCES, INCLUDING PRIVATE, EDUCATIONAL, ACADEMIC, SCIENTIFIC, INSTITUTIONAL, GOVERNMENTAL, AND COMMERCIAL SETTINGS.**
|
|
66
|
+
|
|
67
|
+
**Production Use** includes, without limitation:
|
|
68
|
+
|
|
69
|
+
1. Operating the Software in any live, operational, customer-facing, or production environment, even if the operator calls the deployment a trial, demonstration, pilot, or test.
|
|
70
|
+
2. Using the Software to conduct, record, administer, or support actual financial transactions, business operations, services, or other real-world processes.
|
|
71
|
+
3. Using the Software as the authoritative, primary, or operationally relied-upon store for financial, business, customer, personal, or other records needed in real-world activities.
|
|
72
|
+
4. Connecting the Software to live services, workloads, or systems in a way that may affect their operation, availability, security, or data integrity.
|
|
73
|
+
5. Relying on the Software's outputs, correctness, availability, or durability for operational decisions or for indispensable records.
|
|
74
|
+
6. Incorporating the Software into a product, hosted service, or other system offered to or operated for third parties.
|
|
75
|
+
|
|
76
|
+
**The prohibition applies even if the Software is free, even during an otherwise valid evaluation period, and even when a user voluntarily accepts the risks.**
|
|
77
|
+
|
|
78
|
+
All permitted tests must be isolated in **non-production testing, research, teaching, or development environments**. Commercial Licensees may use the Software **only in their own internal non-production environments**; live-system evaluations and production pilots are not permitted. Test data must be used lawfully and safeguarded independently. The Software must never be the only or authoritative copy of data, and an experiment must not be able to impair operational systems or indispensable records.
|
|
79
|
+
|
|
80
|
+
**Any Production Use without a separate express written license is outside the scope of this License and breaches its conditions.**
|
|
81
|
+
|
|
82
|
+
## 5. Redistribution and derivative works
|
|
83
|
+
|
|
84
|
+
Unless separately authorized by Written Permission or permitted by mandatory law, the Licensee must **not**:
|
|
85
|
+
|
|
86
|
+
- Give, transmit, redistribute, publish, mirror, sell, rent, or sublicense copies of the original or modified Software to third parties.
|
|
87
|
+
- Publish modified source code, independent public derivatives, modified packages, binaries, or releases.
|
|
88
|
+
- Incorporate the Software into third-party products or provide its operation to third parties as a service.
|
|
89
|
+
|
|
90
|
+
Internal copies within the same legal entity are permitted only insofar as necessary for licensed Non-Production Use. Required copyright and license notices must remain intact.
|
|
91
|
+
|
|
92
|
+
Independent scientific results, descriptions, and benchmark findings may be published without permission **provided that the publication does not distribute the Software or substantial portions of protected source code** and does not falsely claim endorsement by the Licensor.
|
|
93
|
+
|
|
94
|
+
## 6. GitHub forks
|
|
95
|
+
|
|
96
|
+
When a Product is published in a public GitHub repository, GitHub users may view and fork it through GitHub's normal functionality to the extent provided by GitHub's applicable Terms of Service.
|
|
97
|
+
|
|
98
|
+
**Forking an unmodified public repository through GitHub is permitted.** It does **not** grant any additional right to execute, deploy, distribute, sublicense, commercialize, or use the Software in production.
|
|
99
|
+
|
|
100
|
+
**Publishing modified versions in public forks, distributing releases from forks, or otherwise publishing independent derivative software requires prior Written Permission** from the Licensor, except where an overriding right under the GitHub Terms of Service or mandatory law applies.
|
|
101
|
+
|
|
102
|
+
This License does not purport to withdraw rights already granted by the Licensor under GitHub's applicable Terms of Service.
|
|
103
|
+
|
|
104
|
+
## 7. Copyright and attribution
|
|
105
|
+
|
|
106
|
+
**Copyright (c) 2026 Achim Meissner. All rights reserved.**
|
|
107
|
+
|
|
108
|
+
All authorized copies and modifications must retain existing copyright notices, this License, and applicable third-party notices. The Licensee must not remove or falsify provenance or imply that the Licensor endorses an independent project.
|
|
109
|
+
|
|
110
|
+
No ownership rights are transferred. All rights not expressly granted are reserved. No trademark, branding, or logo rights are granted beyond accurate identification of the Software. Third-party components continue to be governed by their own licenses.
|
|
111
|
+
|
|
112
|
+
## 8. Use entirely at the Licensee's own risk
|
|
113
|
+
|
|
114
|
+
**THE LICENSEE USES THE SOFTWARE ENTIRELY AT THE LICENSEE'S OWN RISK.**
|
|
115
|
+
|
|
116
|
+
The Software is an **unfinished experimental development prototype**. It may contain defects, incorrect results, security vulnerabilities, incomplete features, platform limitations, crashes, data corruption, data loss, or unrecoverable files.
|
|
117
|
+
|
|
118
|
+
The Licensee is solely responsible for using isolated test environments, selecting appropriate non-critical test data, maintaining independent backups, and preventing experiments from affecting operational systems. Passing tests, published benchmarks, source availability, and documentation **are not warranties and do not authorize Production Use**.
|
|
119
|
+
|
|
120
|
+
## 9. No warranties or support obligation
|
|
121
|
+
|
|
122
|
+
To the maximum extent permitted by applicable law, the Software is provided free of charge **"AS IS" and "AS AVAILABLE"**, without warranties or guarantees of any kind, including warranties of correctness, reliability, security, fitness for a particular purpose, availability, data integrity, durability, recoverability, or freedom from defects.
|
|
123
|
+
|
|
124
|
+
The Licensor has no obligation to provide support, maintenance, compatibility updates, security patches, continuing availability of downloads, corrections, or data-recovery assistance unless separately agreed in writing.
|
|
125
|
+
|
|
126
|
+
Mandatory rights or liabilities that cannot lawfully be excluded remain unaffected.
|
|
127
|
+
|
|
128
|
+
## 10. Limitation of liability
|
|
129
|
+
|
|
130
|
+
**TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW**, the Licensor excludes liability for loss or damage arising from the use, attempted use, inability to use, or unauthorized Production Use of the Software, including data loss, data corruption, financial loss, interruption of operations, lost profit, and consequential damage.
|
|
131
|
+
|
|
132
|
+
For ordinary (slight) negligence, liability is excluded to the extent legally permissible. Where liability cannot be excluded because an essential contractual obligation has been breached, it is limited, insofar as legally permissible, to damage that was foreseeable and typical in view of this **free, experimental, strictly non-production** license.
|
|
133
|
+
|
|
134
|
+
**Nothing in this License excludes or limits liability** for intentional misconduct, gross negligence where its exclusion is impermissible, injury to life, body, or health where liability cannot legally be excluded, fraudulent concealment, express guarantees assumed by the Licensor, or any other liability that mandatory law prevents the Licensor from excluding or limiting.
|
|
135
|
+
|
|
136
|
+
Use outside the permitted scope, in particular prohibited Production Use, is not authorized by this License. This fact does not remove any mandatory statutory liability of the Licensor.
|
|
137
|
+
|
|
138
|
+
## 11. Expiration and termination
|
|
139
|
+
|
|
140
|
+
A time-limited license expires automatically at the end of its permitted period unless extended in writing. A material breach, including prohibited Production Use, unauthorized redistribution, or unauthorized public derivatives, terminates the relevant permission for the affected Product, subject to mandatory applicable law.
|
|
141
|
+
|
|
142
|
+
Upon expiration or termination, the Licensee must **immediately cease executing, deploying, modifying, and otherwise using the affected Software**, unless a separate valid license applies.
|
|
143
|
+
|
|
144
|
+
**Deletion of existing copies is not required.** Retention of a copy does not confer any further right of use. This License does not transfer ownership of the Licensee's independently owned data to the Licensor, but it also does not promise subsequent software access or data export or recovery services.
|
|
145
|
+
|
|
146
|
+
The clauses on ownership, attribution, restrictions, warranty disclaimers, liability, and applicable law survive to the extent legally permissible.
|
|
147
|
+
|
|
148
|
+
## 12. Separate commercial licenses and individual permissions
|
|
149
|
+
|
|
150
|
+
**Any Production Use requires a separate, express written agreement** identifying the Product, authorized use, term, and any commercial, warranty, support, or liability conditions. No such rights are granted here.
|
|
151
|
+
|
|
152
|
+
Requests for commercial licenses, academic cooperation, extensions, or permission to publish modified versions should be sent to:
|
|
153
|
+
|
|
154
|
+
**achim.meissner@nhydb.de**
|
|
155
|
+
**https://nhy-db.com**
|
|
156
|
+
|
|
157
|
+
## 13. Applicable law and mandatory rights
|
|
158
|
+
|
|
159
|
+
This License is intended to be governed by the laws of the Federal Republic of Germany, subject to any overriding mandatory rules, including applicable consumer-protection provisions.
|
|
160
|
+
|
|
161
|
+
Nothing here restricts rights that cannot be contractually excluded under applicable law, including mandatory statutory rights concerning computer programs.
|
|
162
|
+
|
|
163
|
+
If a provision is invalid or unenforceable, the remaining provisions shall continue to apply to the extent legally permissible; mandatory statutory provisions govern the invalid part.
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
**End of NHyDB / dNHyDB Experimental Software License, Version 1.0.**
|
dnhydb-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dnhydb
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Classifier: Development Status :: 3 - Alpha
|
|
5
|
+
Classifier: License :: Other/Proprietary License
|
|
6
|
+
Classifier: Intended Audience :: Developers
|
|
7
|
+
Classifier: Intended Audience :: Science/Research
|
|
8
|
+
Classifier: Operating System :: MacOS
|
|
9
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
10
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
11
|
+
Classifier: Programming Language :: Rust
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
14
|
+
Classifier: Topic :: Database :: Database Engines/Servers
|
|
15
|
+
Requires-Dist: tomli>=1.1 ; python_full_version < '3.11'
|
|
16
|
+
Requires-Dist: numpy>=1.22 ; extra == 'numpy'
|
|
17
|
+
Requires-Dist: pytest>=7 ; extra == 'test'
|
|
18
|
+
Requires-Dist: numpy>=1.22 ; extra == 'test'
|
|
19
|
+
Provides-Extra: numpy
|
|
20
|
+
Provides-Extra: test
|
|
21
|
+
License-File: LICENSE.md
|
|
22
|
+
License-File: THIRD-PARTY-LICENSES.txt
|
|
23
|
+
Summary: dNHyDB (directNHyDB) – general-purpose database with direct addressing (u, v, side); native Rust engine with Python bindings
|
|
24
|
+
Keywords: database,storage-engine,rust,numpy,append-only
|
|
25
|
+
Author-email: Achim Meissner <achim.meissner@nhydb.de>
|
|
26
|
+
Requires-Python: >=3.9
|
|
27
|
+
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
28
|
+
|
|
29
|
+
# dNHyDB (directNHyDB)
|
|
30
|
+
|
|
31
|
+
**dNHyDB** is a general-purpose database with **direct structural
|
|
32
|
+
addressing** `(R1, u, v, s)`: `u` is the record, `v` the field or position
|
|
33
|
+
(both `u64`, 1 … 2^64−1), `s` the side (NL/NR). Ordinary records and fields
|
|
34
|
+
work without tables or a primary index – the address space itself provides
|
|
35
|
+
order. The NHyDB number `N = G² − u` (NL) or `G² + v` (NR) with `G = u + v` is
|
|
36
|
+
computed arithmetically when needed and is never a storage key.
|
|
37
|
+
|
|
38
|
+
The storage engine is written in native Rust; the Python package `dnhydb`
|
|
39
|
+
binds it via PyO3 and offers single operations, NumPy batches and iterators.
|
|
40
|
+
|
|
41
|
+
Version: **0.2.0** · Platforms: Linux, macOS, Windows · License: see
|
|
42
|
+
[`LICENSE.md`](LICENSE.md)
|
|
43
|
+
|
|
44
|
+
## Features
|
|
45
|
+
|
|
46
|
+
* Native Rust core (`crates/dnhydb-core`) without Python dependency;
|
|
47
|
+
dependencies only `crc32fast`, `miniz_oxide`, `libc`.
|
|
48
|
+
* Python package `dnhydb` (PyO3) with single-value API, NumPy batches and
|
|
49
|
+
iterators.
|
|
50
|
+
* One writer (exclusive lock), any number of readers with snapshot isolation
|
|
51
|
+
at the commit boundary and `refresh()`.
|
|
52
|
+
* Append-only container with two CRC-protected superblocks: after a crash the
|
|
53
|
+
last commit is valid, never half a batch.
|
|
54
|
+
* Write buffer, commit policy (manual or thresholds, no background thread),
|
|
55
|
+
transactions with rollback, durability `fsync` / `full` / `none`.
|
|
56
|
+
* Catalog side file for fast opening, iterators that skip gaps, configurable
|
|
57
|
+
caches, VALUE secondary index, compaction, repair, verify/health.
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
From PyPI (prebuilt wheels for CPython 3.9–3.14 on Linux x86_64/aarch64,
|
|
62
|
+
macOS x86_64/arm64 and Windows x64):
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install dnhydb
|
|
66
|
+
pip install numpy # optional, for the NumPy batch API
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
The same files are attached to each release on the *Releases* page of the
|
|
70
|
+
repository.
|
|
71
|
+
|
|
72
|
+
From source (requires a Rust toolchain, see [`BUILDING.md`](BUILDING.md)):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pip install .
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Quick start (Python)
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
import dnhydb
|
|
82
|
+
|
|
83
|
+
with dnhydb.create("data.dnhydb") as db:
|
|
84
|
+
db.define_base([("date", "u64"), ("text", "utf8")])
|
|
85
|
+
with db.transaction():
|
|
86
|
+
db.put_record(1, [20261015, "Hello"])
|
|
87
|
+
db.put_cell(1, 1_000_001, "A poem …")
|
|
88
|
+
|
|
89
|
+
reader = dnhydb.open_reader("data.dnhydb")
|
|
90
|
+
print(reader.get_cell(1, 1_000_001))
|
|
91
|
+
for v, value in reader.cells(1):
|
|
92
|
+
print(v, value)
|
|
93
|
+
print(dnhydb.n_of(1, 1_000_001), dnhydb.address_of(dnhydb.n_of(1, 1_000_001)))
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Quick start (Rust)
|
|
97
|
+
|
|
98
|
+
```rust
|
|
99
|
+
use dnhydb_core::{Db, Options, Lane, TypeCode, Val, FieldSpec};
|
|
100
|
+
|
|
101
|
+
let mut db = Db::create("data.dnhydb", Options::default())?;
|
|
102
|
+
db.define_base(&[FieldSpec::new("date", TypeCode::U64), FieldSpec::new("text", TypeCode::Utf8)], None)?;
|
|
103
|
+
db.put_record(1, &Val::List(vec![Val::from(20261015u64), Val::from("Hello")]), &[], Lane::NL)?;
|
|
104
|
+
db.put_cell(1, 1_000_001, Val::from("A poem"), Lane::NL)?;
|
|
105
|
+
db.commit()?;
|
|
106
|
+
|
|
107
|
+
let r = Db::open_reader("data.dnhydb", Options::default())?;
|
|
108
|
+
for c in r.cells(1, 1..=u64::MAX, Lane::NL) {
|
|
109
|
+
let (v, value) = c?;
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Command line: `dnhydb --help` (or `python -m dnhydb`).
|
|
114
|
+
|
|
115
|
+
## Configuration
|
|
116
|
+
|
|
117
|
+
All options are optional; see
|
|
118
|
+
[`config/dnhydb_config.example.toml`](config/dnhydb_config.example.toml).
|
|
119
|
+
|
|
120
|
+
## Known limitations
|
|
121
|
+
|
|
122
|
+
* **Scope:** one realm (R1) and the CLASSIC layout only; `u` and `v` are
|
|
123
|
+
`u64`; integer values up to `i128`.
|
|
124
|
+
* **One writer at a time** (exclusive lock on `<file>.lock`: `flock` on
|
|
125
|
+
Unix, `LockFileEx` on Windows); readers see the state of the last commit
|
|
126
|
+
and call `refresh()` for newer commits.
|
|
127
|
+
* **Durability `full`:** on macOS `F_FULLFSYNC` is used; if the file system
|
|
128
|
+
rejects it, dNHyDB falls back to a plain `fsync` without reporting an
|
|
129
|
+
error. On Linux `full` is the same as `fsync`; on Windows both use
|
|
130
|
+
`FlushFileBuffers`. Directory entries are synced on Unix only (Windows:
|
|
131
|
+
NTFS journal).
|
|
132
|
+
* **Platforms:** Linux (x86_64, aarch64), macOS (x86_64, arm64) and Windows (x64), CPython 3.9–3.14. On Windows, replacing the
|
|
133
|
+
database file while readers hold it open (compaction) uses POSIX rename
|
|
134
|
+
semantics (Windows 10 or newer, NTFS).
|
|
135
|
+
|
|
136
|
+
## Documentation
|
|
137
|
+
|
|
138
|
+
* [Technical documentation (English)](docs/en/dNHyDB_Technical_Documentation.md)
|
|
139
|
+
* [Technische Dokumentation (Deutsch)](docs/de/dNHyDB_Technische_Dokumentation.md)
|
|
140
|
+
* [`BUILDING.md`](BUILDING.md) – building wheels from source
|
|
141
|
+
* [`RELEASING.md`](RELEASING.md) – versioning and release procedure
|
|
142
|
+
* [`CHANGELOG.md`](CHANGELOG.md)
|
|
143
|
+
|
|
144
|
+
## Tests and benchmarks
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
cargo test -p dnhydb-core --release # Rust core
|
|
148
|
+
pip install ".[test]"
|
|
149
|
+
python -m pytest tests/python # Python package (against the installed wheel)
|
|
150
|
+
|
|
151
|
+
cargo run --release -p dnhydb-core --example bench -- 1000000 target/bench-tmp
|
|
152
|
+
python benchmarks/bench_numpy.py
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Repository layout
|
|
156
|
+
|
|
157
|
+
```text
|
|
158
|
+
crates/dnhydb-core native Rust core (format, codec, addresses, engine)
|
|
159
|
+
crates/dnhydb-py PyO3 binding (the only place with Python dependencies)
|
|
160
|
+
python/dnhydb Python package and CLI
|
|
161
|
+
tests/python Python tests
|
|
162
|
+
benchmarks/ NumPy benchmark
|
|
163
|
+
config/ example configuration
|
|
164
|
+
docs/ documentation (de, en)
|
|
165
|
+
.github/workflows/ CI: tests and wheels
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Scientific Background
|
|
169
|
+
|
|
170
|
+
The mathematical foundations and database architecture are described in:
|
|
171
|
+
|
|
172
|
+
Das Dynadron als mathematisches Datenbankprinzip
|
|
173
|
+
|
|
174
|
+
https://doi.org/10.5281/zenodo.22549415
|
|
175
|
+
|
|
176
|
+
https://doi.org/10.5281/zenodo.23438748
|
|
177
|
+
|
|
178
|
+
https://doi.org/10.5281/zenodo.22694525
|
|
179
|
+
|
|
180
|
+
## License
|
|
181
|
+
|
|
182
|
+
dNHyDB is licensed under the **NHyDB / dNHyDB Experimental Software License 1.0**
|
|
183
|
+
([`LICENSE.md`](LICENSE.md)). The source code is available, but this is
|
|
184
|
+
**not an open-source license**: free use is limited to non-production
|
|
185
|
+
purposes (unlimited for private individuals, time-limited for teaching,
|
|
186
|
+
research and businesses), and **production use is not permitted** without a separate written license. Please read the
|
|
187
|
+
license text before using the software.
|
|
188
|
+
|
|
189
|
+
The compiled extension module contains third-party Rust components (all
|
|
190
|
+
under MIT/Apache-2.0-style licenses); their notices are in
|
|
191
|
+
[`THIRD-PARTY-LICENSES.txt`](THIRD-PARTY-LICENSES.txt), which is also shipped
|
|
192
|
+
inside the wheel.
|
|
193
|
+
|
|
194
|
+
## Contact
|
|
195
|
+
|
|
196
|
+
Achim Meissner – achim.meissner@nhydb.de
|
|
197
|
+
|