Compare commits

..

85 commits

Author SHA1 Message Date
201ec39dd2 updates (#323)
Reviewed-on: #323
Co-authored-by: Greg Burd <greg@burd.me>
Co-committed-by: Greg Burd <greg@burd.me>
2023-12-07 20:03:13 +00:00
216f078d44 Merge pull request 'Update peg requirement from ~0.7 to ~0.8' (#311) from dependabot/cargo/peg-approx-0.8 into master
Reviewed-on: #311
2023-11-25 16:00:29 +00:00
8ab11d3503 Merge branch 'master' into dependabot/cargo/peg-approx-0.8 2023-11-25 16:00:09 +00:00
92eab3692f Merge pull request 'Update indexmap requirement from ~1.7 to ~1.9' (#316) from dependabot/cargo/indexmap-approx-1.9 into master
Reviewed-on: #316
2023-11-25 15:59:55 +00:00
02ebaf5bae Merge branch 'master' into dependabot/cargo/indexmap-approx-1.9 2023-11-25 15:59:43 +00:00
517b781da1 Merge pull request 'Update rusqlite requirement from ~0.26 to ~0.29' (#320) from dependabot/cargo/rusqlite-approx-0.29 into master
Reviewed-on: #320
2023-11-25 15:59:34 +00:00
6b269a660d Merge branch 'master' into dependabot/cargo/rusqlite-approx-0.29 2023-11-25 15:59:20 +00:00
92f400a553 Merge pull request 'Update tempfile requirement from ~3.2 to ~3.5' (#321) from dependabot/cargo/tempfile-approx-3.5 into master
Reviewed-on: #321
2023-11-25 15:58:29 +00:00
ff527ad220 Merge branch 'master' into dependabot/cargo/tempfile-approx-3.5 2023-11-25 15:57:56 +00:00
73240913cc Merge pull request 'Update pretty requirement from ~0.10 to ~0.12' (#322) from dependabot/cargo/pretty-approx-0.12 into master
Reviewed-on: #322
2023-11-25 15:57:44 +00:00
dependabot[bot]
c10575e04d
Update pretty requirement from ~0.10 to ~0.12
Updates the requirements on [pretty](https://github.com/Marwes/pretty.rs) to permit the latest version.
- [Release notes](https://github.com/Marwes/pretty.rs/releases)
- [Changelog](https://github.com/Marwes/pretty.rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Marwes/pretty.rs/compare/v0.10.0...v0.12.0)

---
updated-dependencies:
- dependency-name: pretty
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-31 10:02:08 +00:00
dependabot[bot]
5fdb9a4970
Update tempfile requirement from ~3.2 to ~3.5
Updates the requirements on [tempfile](https://github.com/Stebalien/tempfile) to permit the latest version.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/commits)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-29 10:02:12 +00:00
dependabot[bot]
8f226ca050
Update rusqlite requirement from ~0.26 to ~0.29
Updates the requirements on [rusqlite](https://github.com/rusqlite/rusqlite) to permit the latest version.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/rusqlite-0.26.1...v0.29.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-27 10:11:21 +00:00
dependabot[bot]
aa6b634e64
Update indexmap requirement from ~1.7 to ~1.9
Updates the requirements on [indexmap](https://github.com/bluss/indexmap) to permit the latest version.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Changelog](https://github.com/bluss/indexmap/blob/master/RELEASES.md)
- [Commits](https://github.com/bluss/indexmap/compare/1.7.0...1.9.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-17 09:37:21 +00:00
986b439fb9 ignore warnings from clippy 2022-05-04 17:09:30 -04:00
dependabot[bot]
0d55e6acba
Update peg requirement from ~0.7 to ~0.8
Updates the requirements on [peg](https://github.com/kevinmehall/rust-peg) to permit the latest version.
- [Release notes](https://github.com/kevinmehall/rust-peg/releases)
- [Commits](https://github.com/kevinmehall/rust-peg/compare/0.7.0...0.8.0)

---
updated-dependencies:
- dependency-name: peg
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-04 18:47:06 +00:00
d39f8aad4e
Merge pull request #310 from qpdb/dependabot/cargo/uuid-approx-1.0
Update uuid requirement from ~0.8 to ~1.0
2022-05-04 14:45:35 -04:00
7cfff34602 Name changed, prefix 'to_' was removed.
Signed-off-by: Greg Burd <greg@burd.me>
2022-05-04 14:41:21 -04:00
dependabot[bot]
8175b98a7c
Update uuid requirement from ~0.8 to ~1.0
Updates the requirements on [uuid](https://github.com/uuid-rs/uuid) to permit the latest version.
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/0.8.0...1.0.0)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-05-03 17:30:32 +00:00
Mark Watts
b19a994c68 resolve compile errors from rusqlite update 2021-11-10 22:17:19 -05:00
Mark Watts
9a4ba44060
Merge pull request #29 from mwatts/dependabot/cargo/rusqlite-approx-0.26
Update rusqlite requirement from ~0.25 to ~0.26
2021-11-09 22:43:40 -05:00
Mark Watts
124bf54385
Merge pull request #26 from mwatts/dependabot/cargo/ordered-float-approx-2.8
Update ordered-float requirement from ~2.7 to ~2.8
2021-11-09 22:43:08 -05:00
Mark Watts
3df00eb63a
Merge pull request #27 from mwatts/dependabot/cargo/dirs-approx-4.0
Update dirs requirement from ~3.0 to ~4.0
2021-11-09 22:42:51 -05:00
Mark Watts
8041c704dc
Merge pull request #28 from mwatts/dependabot/bundler/docs/nokogiri-1.12.5
Bump nokogiri from 1.11.7 to 1.12.5 in /docs
2021-11-09 22:42:26 -05:00
dependabot[bot]
4aa70567b8
Update rusqlite requirement from ~0.25 to ~0.26
Updates the requirements on [rusqlite](https://github.com/rusqlite/rusqlite) to permit the latest version.
- [Release notes](https://github.com/rusqlite/rusqlite/releases)
- [Changelog](https://github.com/rusqlite/rusqlite/blob/master/Changelog.md)
- [Commits](https://github.com/rusqlite/rusqlite/compare/v0.25.0...v0.26.0)

---
updated-dependencies:
- dependency-name: rusqlite
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-04 21:22:11 +00:00
dependabot[bot]
c9a46327bc
Bump nokogiri from 1.11.7 to 1.12.5 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.11.7 to 1.12.5.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.11.7...v1.12.5)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-28 05:59:06 +00:00
dependabot[bot]
d22bf451a4
Update dirs requirement from ~3.0 to ~4.0
Updates the requirements on [dirs](https://github.com/soc/dirs-rs) to permit the latest version.
- [Release notes](https://github.com/soc/dirs-rs/releases)
- [Commits](https://github.com/soc/dirs-rs/commits)

---
updated-dependencies:
- dependency-name: dirs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-16 21:21:31 +00:00
dependabot[bot]
e73effb7d2
Update ordered-float requirement from ~2.7 to ~2.8
Updates the requirements on [ordered-float](https://github.com/reem/rust-ordered-float) to permit the latest version.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v2.7.0...v2.8.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-02 21:14:10 +00:00
Mark Watts
eae76e6f43 cargo fmt 2021-08-23 21:31:50 -04:00
Mark Watts
bd818ba1f1
Merge pull request #24 from mwatts/feature/blobs
add blob/bytes as a type
2021-08-23 21:19:24 -04:00
Mark Watts
73feb622cd implement bytes (aka blobs) as native type 2021-08-23 17:25:10 -04:00
Mark Watts
d3821432bc fix problem parsing entities
issue with how bytes are not a collection -> bytes not correctly viewed as atoms
2021-08-23 17:23:09 -04:00
Mark Watts
179c123061 fix panic macro use 2021-08-23 17:21:51 -04:00
Mark Watts
1500d4348c add blobs via #bytes to edn 2021-08-22 17:41:50 -04:00
Mark Watts
479fbc4572
Merge pull request #22 from mwatts/dependabot/cargo/time-0.3.1
Update time requirement from 0.2.15 to 0.3.1
2021-08-22 17:17:11 -04:00
dependabot[bot]
97628a251f
Update time requirement from 0.2.15 to 0.3.1
Updates the requirements on [time](https://github.com/time-rs/time) to permit the latest version.
- [Release notes](https://github.com/time-rs/time/releases)
- [Changelog](https://github.com/time-rs/time/blob/main/CHANGELOG.md)
- [Commits](https://github.com/time-rs/time/compare/v0.2.15...v0.3.1)

---
updated-dependencies:
- dependency-name: time
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-08-22 21:12:22 +00:00
Mark Watts
903ac24589
Merge pull request #18 from mwatts/dependabot/cargo/ordered-float-approx-2.7
Update ordered-float requirement from ~2.5 to ~2.7
2021-08-22 17:11:01 -04:00
Mark Watts
1f6620bf87
Merge pull request #16 from mwatts/dependabot/cargo/petgraph-approx-0.6
Update petgraph requirement from ~0.5 to ~0.6
2021-08-22 17:10:17 -04:00
Mark Watts
e64e2cf2f2
Merge pull request #23 from mwatts/feature/blobs
remove warnings about Itertools::intersperse
2021-08-22 17:09:42 -04:00
Mark Watts
08694dc45a remove warnings about Itertools::intersperse 2021-08-22 16:53:29 -04:00
Mark Watts
64bb6284d0
Merge pull request #20 from mwatts/dependabot/cargo/env_logger-approx-0.9
Update env_logger requirement from ~0.8 to ~0.9
2021-07-17 17:05:56 -04:00
Mark Watts
5f376a8664
Merge pull request #19 from mwatts/dependabot/bundler/docs/addressable-2.8.0
Bump addressable from 2.7.0 to 2.8.0 in /docs
2021-07-17 16:49:04 -04:00
dependabot[bot]
ad3d7157a5
Update env_logger requirement from ~0.8 to ~0.9
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.0...v0.9.0)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-14 21:21:11 +00:00
dependabot[bot]
46ddac347e
Bump addressable from 2.7.0 to 2.8.0 in /docs
Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0.
- [Release notes](https://github.com/sporkmonger/addressable/releases)
- [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0)

---
updated-dependencies:
- dependency-name: addressable
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-13 18:24:45 +00:00
dependabot[bot]
fba46fb1f2
Update ordered-float requirement from ~2.5 to ~2.7
Updates the requirements on [ordered-float](https://github.com/reem/rust-ordered-float) to permit the latest version.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v2.5.0...v2.7.0)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-12 21:20:06 +00:00
dependabot[bot]
071a916981
Update petgraph requirement from ~0.5 to ~0.6
Updates the requirements on [petgraph](https://github.com/petgraph/petgraph) to permit the latest version.
- [Release notes](https://github.com/petgraph/petgraph/releases)
- [Changelog](https://github.com/petgraph/petgraph/blob/master/RELEASES.rst)
- [Commits](https://github.com/petgraph/petgraph/compare/0.5.0...0.6.0)

---
updated-dependencies:
- dependency-name: petgraph
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-05 21:18:06 +00:00
Mark Watts
d4736a83e4 warnings cleanup 2021-07-02 20:39:02 -04:00
Mark Watts
15df38fc8f update rusqlite - all tests pass - some warnings 2021-07-02 20:29:41 -04:00
Mark Watts
614ce63e2b
Merge pull request #13 from mwatts/dependabot/cargo/itertools-approx-0.10
Update itertools requirement from ~0.9 to ~0.10
2021-07-02 19:44:34 -04:00
Mark Watts
5a7caf7488 more package updates; all tests pass 2021-07-02 18:09:07 -04:00
Mark Watts
a02570fd5e
Merge pull request #14 from mwatts/dependabot/cargo/peg-approx-0.7
Update peg requirement from ~0.6 to ~0.7
2021-07-02 17:52:18 -04:00
Mark Watts
4ec3c3cddc
Merge pull request #15 from mwatts/dependabot/cargo/tokio-approx-1.8
Update tokio requirement from ~0.2 to ~1.8
2021-07-02 17:51:58 -04:00
dependabot[bot]
8e8e7b9739
Update itertools requirement from ~0.9 to ~0.10
Updates the requirements on [itertools](https://github.com/rust-itertools/itertools) to permit the latest version.
- [Release notes](https://github.com/rust-itertools/itertools/releases)
- [Changelog](https://github.com/rust-itertools/itertools/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-itertools/itertools/compare/v0.9.0...v0.10.1)

---
updated-dependencies:
- dependency-name: itertools
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:50:01 +00:00
Mark Watts
abcdad5976
Merge pull request #11 from mwatts/dependabot/cargo/hyper-tls-approx-0.5
Update hyper-tls requirement from ~0.4 to ~0.5
2021-07-02 17:49:02 -04:00
dependabot[bot]
9d4f328af1
Update tokio requirement from ~0.2 to ~1.8
Updates the requirements on [tokio](https://github.com/tokio-rs/tokio) to permit the latest version.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-0.2.0...tokio-1.8.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:49:02 +00:00
dependabot[bot]
f918dcd915
Update peg requirement from ~0.6 to ~0.7
Updates the requirements on [peg](https://github.com/kevinmehall/rust-peg) to permit the latest version.
- [Release notes](https://github.com/kevinmehall/rust-peg/releases)
- [Commits](https://github.com/kevinmehall/rust-peg/compare/0.6.0...0.7.0)

---
updated-dependencies:
- dependency-name: peg
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:48:51 +00:00
Mark Watts
7185d5ee13
Merge pull request #12 from mwatts/dependabot/cargo/indexmap-approx-1.7
Update indexmap requirement from ~1.5 to ~1.7
2021-07-02 17:48:48 -04:00
Mark Watts
c8c7dda27a
Merge pull request #8 from mwatts/dependabot/cargo/num-approx-0.4
Update num requirement from ~0.3 to ~0.4
2021-07-02 17:47:48 -04:00
Mark Watts
2f299fde6c update gitignore to ignore doc related files 2021-07-02 17:44:41 -04:00
Mark Watts
3a62dbc122 add packages to workspace 2021-07-02 17:44:13 -04:00
Mark Watts
0d79eeed8f update Gemfile.lock 2021-07-02 17:40:14 -04:00
dependabot[bot]
ca9d8c0096
Update hyper-tls requirement from ~0.4 to ~0.5
Updates the requirements on [hyper-tls](https://github.com/hyperium/hyper-tls) to permit the latest version.
- [Release notes](https://github.com/hyperium/hyper-tls/releases)
- [Commits](https://github.com/hyperium/hyper-tls/compare/v0.4.0...v0.5.0)

---
updated-dependencies:
- dependency-name: hyper-tls
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:30:48 +00:00
dependabot[bot]
ffaba698e0
Update indexmap requirement from ~1.5 to ~1.7
Updates the requirements on [indexmap](https://github.com/bluss/indexmap) to permit the latest version.
- [Release notes](https://github.com/bluss/indexmap/releases)
- [Commits](https://github.com/bluss/indexmap/compare/1.5.0...1.7.0)

---
updated-dependencies:
- dependency-name: indexmap
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:30:48 +00:00
Mark Watts
8446a1bc4a
Merge pull request #7 from mwatts/dependabot/cargo/hyper-approx-0.14
Update hyper requirement from ~0.13 to ~0.14
2021-07-02 17:29:13 -04:00
dependabot[bot]
722f7fb782
Update num requirement from ~0.3 to ~0.4
Updates the requirements on [num](https://github.com/rust-num/num) to permit the latest version.
- [Release notes](https://github.com/rust-num/num/releases)
- [Changelog](https://github.com/rust-num/num/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num/compare/num-0.3.0...num-0.4.0)

---
updated-dependencies:
- dependency-name: num
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:29:09 +00:00
Mark Watts
75b5a66a91
Merge pull request #10 from mwatts/dependabot/cargo/env_logger-0.8
Update env_logger requirement from 0.7 to 0.8
2021-07-02 17:27:57 -04:00
Mark Watts
ac532be358
Merge pull request #9 from mwatts/dependabot/cargo/ordered-float-approx-2.5
Update ordered-float requirement from ~2.0 to ~2.5
2021-07-02 17:26:35 -04:00
dependabot[bot]
44036160d0
Update env_logger requirement from 0.7 to 0.8
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version.
- [Release notes](https://github.com/env-logger-rs/env_logger/releases)
- [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/env-logger-rs/env_logger/commits/v0.8.4)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:21:18 +00:00
dependabot[bot]
c8c1363b14
Update ordered-float requirement from ~2.0 to ~2.5
Updates the requirements on [ordered-float](https://github.com/reem/rust-ordered-float) to permit the latest version.
- [Release notes](https://github.com/reem/rust-ordered-float/releases)
- [Commits](https://github.com/reem/rust-ordered-float/compare/v2.0.0...v2.5.1)

---
updated-dependencies:
- dependency-name: ordered-float
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:21:07 +00:00
dependabot[bot]
32ce6d2129
Update hyper requirement from ~0.13 to ~0.14
Updates the requirements on [hyper](https://github.com/hyperium/hyper) to permit the latest version.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hyperium/hyper/compare/v0.13.0...v0.14.9)

---
updated-dependencies:
- dependency-name: hyper
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 21:20:42 +00:00
Mark Watts
380945a655 update Gemfile.lock 2021-07-02 17:18:18 -04:00
Mark Watts
af9bb1fcfe add packages to workspace 2021-07-02 17:11:28 -04:00
Mark Watts
c295d82872
Merge pull request #5 from mwatts/dependabot/cargo/combine-approx-4.6
Update combine requirement from ~4.3 to ~4.6
2021-07-02 10:11:50 -04:00
Mark Watts
c2e39eeb5c
Merge pull request #4 from mwatts/dependabot/cargo/rustc_version-approx-0.4
Update rustc_version requirement from ~0.3 to ~0.4
2021-07-02 10:11:26 -04:00
Mark Watts
985fd0bbdf
Merge pull request #3 from mwatts/dependabot/cargo/tempfile-approx-3.2
Update tempfile requirement from ~3.1 to ~3.2
2021-07-02 10:10:59 -04:00
dependabot[bot]
c02c06ce2b
Update combine requirement from ~4.3 to ~4.6
Updates the requirements on [combine](https://github.com/Marwes/combine) to permit the latest version.
- [Release notes](https://github.com/Marwes/combine/releases)
- [Changelog](https://github.com/Marwes/combine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Marwes/combine/compare/v4.3.0...v4.6.0)

---
updated-dependencies:
- dependency-name: combine
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 14:06:31 +00:00
dependabot[bot]
b138c7e257
Update rustc_version requirement from ~0.3 to ~0.4
Updates the requirements on [rustc_version](https://github.com/Kimundi/rustc-version-rs) to permit the latest version.
- [Release notes](https://github.com/Kimundi/rustc-version-rs/releases)
- [Commits](https://github.com/Kimundi/rustc-version-rs/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: rustc_version
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 14:06:12 +00:00
dependabot[bot]
88df3c4d8d
Update tempfile requirement from ~3.1 to ~3.2
Updates the requirements on [tempfile](https://github.com/Stebalien/tempfile) to permit the latest version.
- [Release notes](https://github.com/Stebalien/tempfile/releases)
- [Changelog](https://github.com/Stebalien/tempfile/blob/master/NEWS)
- [Commits](https://github.com/Stebalien/tempfile/compare/v3.1.0...v3.2.0)

---
updated-dependencies:
- dependency-name: tempfile
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 14:06:01 +00:00
Mark Watts
feb9665299
Create dependabot.yml 2021-07-02 10:04:44 -04:00
Mark Watts
19cb2870da
fix invalid cron in audit 2021-07-02 08:55:38 -04:00
Mark Watts
5c2a7261a1
Merge pull request #2 from mwatts/dependabot/bundler/docs/nokogiri-1.11.7
Bump nokogiri from 1.8.3 to 1.11.7 in /docs
2021-07-02 08:50:52 -04:00
Mark Watts
0f015b2f10
Merge pull request #1 from mwatts/dependabot/bundler/docs/rubyzip-2.3.0
Bump rubyzip from 1.2.1 to 2.3.0 in /docs
2021-07-02 08:40:26 -04:00
dependabot[bot]
da89cfc797
Bump nokogiri from 1.8.3 to 1.11.7 in /docs
Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.8.3 to 1.11.7.
- [Release notes](https://github.com/sparklemotion/nokogiri/releases)
- [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.8.3...v1.11.7)

---
updated-dependencies:
- dependency-name: nokogiri
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 12:37:59 +00:00
dependabot[bot]
9a6ae48d8e
Bump rubyzip from 1.2.1 to 2.3.0 in /docs
Bumps [rubyzip](https://github.com/rubyzip/rubyzip) from 1.2.1 to 2.3.0.
- [Release notes](https://github.com/rubyzip/rubyzip/releases)
- [Changelog](https://github.com/rubyzip/rubyzip/blob/master/Changelog.md)
- [Commits](https://github.com/rubyzip/rubyzip/compare/v1.2.1...v2.3.0)

---
updated-dependencies:
- dependency-name: rubyzip
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-02 12:37:57 +00:00
Mark Watts
d97e882a4a
remove windows temporarily 2020-11-17 21:15:42 -05:00
58 changed files with 473 additions and 256 deletions

11
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"

View file

@ -2,7 +2,7 @@ name: Security audit
on:
schedule:
- cron: '0 0 0 * *'
- cron: '0 0 1 * *'
push:
paths:
- '**/Cargo.toml'

View file

@ -12,4 +12,5 @@ jobs:
override: true
- uses: actions-rs/clippy-check@v1
with:
args: --all-targets --all-features -- -D warnings
token: ${{ secrets.GITHUB_TOKEN }}

View file

@ -10,7 +10,7 @@ jobs:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
# - windows-latest
steps:
- uses: actions/checkout@v2

2
.gitignore vendored
View file

@ -15,6 +15,8 @@
.lein-plugins/
.lein-repl-history
.nrepl-port
.bundle/
docs/vendor/
/.lein-*
/.nrepl-port
Cargo.lock

View file

@ -1,5 +1,5 @@
[package]
edition = "2018"
edition = "2021"
authors = [
"Richard Newman <rnewman@twinql.com>",
"Nicholas Alexander <nalexander@mozilla.com>",
@ -14,7 +14,7 @@ authors = [
"Gregory Burd <greg@burd.me>",
]
name = "mentat"
version = "0.13.0"
version = "0.14.0"
build = "build/version.rs"
[features]
@ -24,18 +24,23 @@ sqlcipher = ["rusqlite/sqlcipher", "mentat_db/sqlcipher"]
syncable = ["mentat_tolstoy", "tolstoy_traits", "mentat_db/syncable"]
[workspace]
members = ["tools/cli", "ffi"]
members = [
"tools/cli",
"ffi", "core", "core-traits","db", "db-traits", "edn", "public-traits", "query-algebrizer",
"query-algebrizer-traits", "query-projector", "query-projector-traits","query-pull",
"query-sql", "sql", "sql-traits", "tolstoy-traits", "tolstoy", "transaction"
]
[build-dependencies]
rustc_version = "~0.3"
rustc_version = "~0.4"
[dev-dependencies]
assert_approx_eq = "~1.1"
[dev-dependencies.cargo-husky]
version = "1"
default-features = false # Disable features which are enabled by default
features = ["run-for-all", "precommit-hook", "run-cargo-fmt", "run-cargo-test", "run-cargo-check", "run-cargo-clippy"]
#[dev-dependencies.cargo-husky]
#version = "1"
#default-features = false # Disable features which are enabled by default
#features = ["run-for-all", "precommit-hook", "run-cargo-fmt", "run-cargo-test", "run-cargo-check", "run-cargo-clippy"]
#cargo audit
#cargo outdated
@ -43,12 +48,12 @@ features = ["run-for-all", "precommit-hook", "run-cargo-fmt", "run-cargo-test",
chrono = "~0.4"
failure = "~0.1"
lazy_static = "~1.4"
time = "0.2.15"
time = "0.3.1"
log = "~0.4"
uuid = { version = "~0.8", features = ["v4", "serde"] }
uuid = { version = "~1", features = ["v4", "serde"] }
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]

View file

@ -1,3 +1,4 @@
.PHONY: outdated fix
outdated:
for p in $(dirname $(ls Cargo.toml */Cargo.toml */*/Cargo.toml)); do echo $p; (cd $p; cargo outdated -R); done
@ -6,3 +7,5 @@ outdated:
fix:
$(for p in $(dirname $(ls Cargo.toml */Cargo.toml */*/Cargo.toml)); do echo $p; (cd $p; cargo fix --allow-dirty --broken-code --edition-idioms); done)
upgrades:
cargo upgrades

View file

@ -14,7 +14,7 @@ use std::process::exit;
/// MIN_VERSION should be changed when there's a new minimum version of rustc required
/// to build the project.
static MIN_VERSION: &str = "1.43.0";
static MIN_VERSION: &str = "1.69.0";
fn main() {
let ver = version().unwrap();

View file

@ -11,11 +11,12 @@ path = "lib.rs"
chrono = { version = "~0.4", features = ["serde"] }
enum-set = "~0.0.8"
lazy_static = "~1.4"
indexmap = "~1.5"
ordered-float = { version = "~2.0", features = ["serde"] }
uuid = { version = "~0.8", features = ["v4", "serde"] }
indexmap = "~1.9"
ordered-float = { version = "~2.8", features = ["serde"] }
uuid = { version = "~1", features = ["v4", "serde"] }
serde = { version = "~1.0", features = ["rc"] }
serde_derive = "~1.0"
bytes = { version = "1.0.1", features = ["serde"] }
[dependencies.edn]
path = "../edn"

View file

@ -14,6 +14,7 @@ extern crate indexmap;
extern crate ordered_float;
#[macro_use]
extern crate serde_derive;
extern crate bytes;
extern crate edn;
extern crate uuid;
#[macro_use]
@ -33,6 +34,7 @@ use std::sync::Arc;
use std::collections::BTreeMap;
use bytes::Bytes;
use indexmap::IndexMap;
use enum_set::EnumSet;
@ -280,6 +282,7 @@ pub enum ValueType {
String,
Keyword,
Uuid,
Bytes,
}
impl ValueType {
@ -294,6 +297,7 @@ impl ValueType {
s.insert(ValueType::String);
s.insert(ValueType::Keyword);
s.insert(ValueType::Uuid);
s.insert(ValueType::Bytes);
s
}
}
@ -321,6 +325,7 @@ impl ValueType {
ValueType::String => "string",
ValueType::Keyword => "keyword",
ValueType::Uuid => "uuid",
ValueType::Bytes => "bytes",
},
)
}
@ -338,6 +343,7 @@ impl ValueType {
"string" => Some(ValueType::String),
"keyword" => Some(ValueType::Keyword),
"uuid" => Some(ValueType::Uuid),
"bytes" => Some(ValueType::Bytes),
_ => None,
}
}
@ -355,6 +361,7 @@ impl ValueType {
ValueType::String => "string",
ValueType::Keyword => "keyword",
ValueType::Uuid => "uuid",
ValueType::Bytes => "bytes",
},
)
}
@ -369,6 +376,7 @@ impl ValueType {
ValueType::String => values::DB_TYPE_STRING.clone(),
ValueType::Keyword => values::DB_TYPE_KEYWORD.clone(),
ValueType::Uuid => values::DB_TYPE_UUID.clone(),
ValueType::Bytes => values::DB_TYPE_BYTES.clone(),
}
}
@ -391,6 +399,7 @@ impl fmt::Display for ValueType {
ValueType::String => ":db.type/string",
ValueType::Keyword => ":db.type/keyword",
ValueType::Uuid => ":db.type/uuid",
ValueType::Bytes => ":db.type/bytes",
}
)
}
@ -414,6 +423,7 @@ pub enum TypedValue {
String(ValueRc<String>),
Keyword(ValueRc<Keyword>),
Uuid(Uuid), // It's only 128 bits, so this should be acceptable to clone.
Bytes(Bytes),
}
impl From<KnownEntid> for TypedValue {
@ -445,6 +455,7 @@ impl TypedValue {
TypedValue::String(_) => ValueType::String,
TypedValue::Keyword(_) => ValueType::Keyword,
TypedValue::Uuid(_) => ValueType::Uuid,
TypedValue::Bytes(_) => ValueType::Bytes,
}
}
@ -571,7 +582,7 @@ impl TypedValue {
match self {
TypedValue::Uuid(v) => {
// Get an independent copy of the string.
let s: String = v.to_hyphenated().to_string();
let s: String = v.hyphenated().to_string();
// Make a CString out of the new bytes.
let c: CString = CString::new(s).expect("String conversion failed!");
@ -592,7 +603,14 @@ impl TypedValue {
pub fn into_uuid_string(self) -> Option<String> {
match self {
TypedValue::Uuid(v) => Some(v.to_hyphenated().to_string()),
TypedValue::Uuid(v) => Some(v.hyphenated().to_string()),
_ => None,
}
}
pub fn into_bytes(self) -> Option<Bytes> {
match self {
TypedValue::Bytes(b) => Some(b),
_ => None,
}
}
@ -686,6 +704,12 @@ impl From<f64> for TypedValue {
}
}
impl From<&[u8]> for TypedValue {
fn from(bslice: &[u8]) -> Self {
TypedValue::Bytes(Bytes::copy_from_slice(bslice))
}
}
trait MicrosecondPrecision {
/// Truncate the provided `DateTime` to microsecond precision.
fn microsecond_precision(self) -> Self;
@ -939,7 +963,7 @@ impl Binding {
pub fn into_uuid_string(self) -> Option<String> {
match self {
Binding::Scalar(TypedValue::Uuid(v)) => Some(v.to_hyphenated().to_string()),
Binding::Scalar(TypedValue::Uuid(v)) => Some(v.hyphenated().to_string()),
_ => None,
}
}

View file

@ -58,6 +58,7 @@ lazy_static_namespaced_keyword_value!(DB_TYPE_REF, "db.type", "ref");
lazy_static_namespaced_keyword_value!(DB_TYPE_STRING, "db.type", "string");
lazy_static_namespaced_keyword_value!(DB_TYPE_URI, "db.type", "uri");
lazy_static_namespaced_keyword_value!(DB_TYPE_UUID, "db.type", "uuid");
lazy_static_namespaced_keyword_value!(DB_TYPE_BYTES, "db.type", "bytes");
lazy_static_namespaced_keyword_value!(DB_UNIQUE, "db", "unique");
lazy_static_namespaced_keyword_value!(DB_UNIQUE_IDENTITY, "db.unique", "identity");
lazy_static_namespaced_keyword_value!(DB_UNIQUE_VALUE, "db.unique", "value");

View file

@ -7,9 +7,9 @@ workspace = ".."
chrono = { version = "~0.4", features = ["serde"] }
enum-set = "~0.0"
failure = "~0.1"
indexmap = "~1.5"
ordered-float = { version = "~2.0", features = ["serde"] }
uuid = { version = "~0.8", features = ["v4", "serde"] }
indexmap = "~1.9"
ordered-float = { version = "~2.8", features = ["serde"] }
uuid = { version = "~1", features = ["v4", "serde"] }
[dependencies.core_traits]
path = "../core-traits"

View file

@ -51,6 +51,7 @@ impl SQLValueType for ValueType {
ValueType::String => (10, None),
ValueType::Uuid => (11, None),
ValueType::Keyword => (13, None),
ValueType::Bytes => (15, Some(SQLTypeAffinity::Blob)),
}
}
@ -71,6 +72,7 @@ impl SQLValueType for ValueType {
ValueType::String => false,
Keyword => false,
Uuid => false,
Bytes => false,
}
}
}

View file

@ -21,5 +21,5 @@ path = "../edn"
path = "../core-traits"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]

View file

@ -118,10 +118,10 @@ impl ::std::fmt::Display for InputError {
match self {
BadDbId => {
writeln!(f, ":db/id in map notation must either not be present or be an entid, an ident, or a tempid")
},
}
BadEntityPlace => {
writeln!(f, "cannot convert value place into entity place")
},
}
}
}
}

View file

@ -10,19 +10,19 @@ syncable = ["serde", "serde_json", "serde_derive"]
[dependencies]
failure = "~0.1"
indexmap = "~1.5"
itertools = "~0.9"
indexmap = "~1.9"
itertools = "~0.10"
lazy_static = "~1.4"
log = "~0.4"
ordered-float = "~2.0"
time = "~0.2"
petgraph = "~0.5"
ordered-float = "~2.8"
time = "~0.3"
petgraph = "~0.6"
serde = { version = "~1.0", optional = true }
serde_json = { version = "~1.0", optional = true }
serde_derive = { version = "~1.0", optional = true }
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]
@ -45,5 +45,5 @@ path = "../sql"
version = "~1.2"
[dev-dependencies]
env_logger = "0.7"
env_logger = "0.9"
#tabwriter = { version = "1.2.1" }

View file

@ -61,6 +61,7 @@ use std::iter::Peekable;
use failure::ResultExt;
use rusqlite;
use rusqlite::params_from_iter;
use core_traits::{Binding, Entid, TypedValue};
@ -1071,7 +1072,9 @@ impl AttributeCaches {
replacing: bool,
) -> Result<()> {
let mut aev_factory = AevFactory::new();
let rows = statement.query_map(&args, |row| Ok(aev_factory.row_to_aev(row)))?;
let rows = statement.query_map(params_from_iter(&args), |row| {
Ok(aev_factory.row_to_aev(row))
})?;
let aevs = AevRows { rows };
self.accumulate_into_cache(
None,

View file

@ -22,6 +22,7 @@ use itertools;
use itertools::Itertools;
use rusqlite;
use rusqlite::limits::Limit;
use rusqlite::params_from_iter;
use rusqlite::types::{ToSql, ToSqlOutput};
use rusqlite::TransactionBehavior;
@ -433,6 +434,7 @@ impl TypedSQLValue for TypedValue {
Ok(TypedValue::Uuid(u))
}
(13, rusqlite::types::Value::Text(x)) => to_namespaced_keyword(&x).map(|k| k.into()),
(15, rusqlite::types::Value::Blob(x)) => Ok(TypedValue::Bytes(x.into())),
(_, value) => bail!(DbErrorKind::BadSQLValuePair(value, value_type_tag)),
}
}
@ -453,6 +455,7 @@ impl TypedSQLValue for TypedValue {
Value::Float(ref x) => Some(TypedValue::Double(*x)),
Value::Text(ref x) => Some(x.clone().into()),
Value::Keyword(ref x) => Some(x.clone().into()),
Value::Bytes(b) => Some(TypedValue::Bytes(b.clone())),
_ => None,
}
}
@ -469,6 +472,7 @@ impl TypedSQLValue for TypedValue {
TypedValue::String(ref x) => (x.as_str().into(), 10),
TypedValue::Uuid(ref u) => (u.as_bytes().to_vec().into(), 11),
TypedValue::Keyword(ref x) => (x.to_string().into(), 13),
TypedValue::Bytes(b) => (b.to_vec().into(), 15),
}
}
@ -483,6 +487,7 @@ impl TypedSQLValue for TypedValue {
TypedValue::String(ref x) => (Value::Text(x.as_ref().clone()), ValueType::String),
TypedValue::Uuid(ref u) => (Value::Uuid(*u), ValueType::Uuid),
TypedValue::Keyword(ref x) => (Value::Keyword(x.as_ref().clone()), ValueType::Keyword),
TypedValue::Bytes(b) => (Value::Bytes(b.clone()), ValueType::Bytes),
}
}
}
@ -804,7 +809,7 @@ impl MentatStoring for rusqlite::Connection {
values);
let mut stmt: rusqlite::Statement = self.prepare(s.as_str())?;
let m: Result<Vec<(i64, Entid)>> = stmt.query_and_then(&params, |row| -> Result<(i64, Entid)> {
let m: Result<Vec<(i64, Entid)>> = stmt.query_and_then(params_from_iter(&params), |row| -> Result<(i64, Entid)> {
Ok((row.get(0)?, row.get(1)?))
})?.collect();
m
@ -948,7 +953,7 @@ impl MentatStoring for rusqlite::Connection {
// TODO: consider ensuring we inserted the expected number of rows.
let mut stmt = self.prepare_cached(s.as_str())?;
stmt.execute(&params)
stmt.execute(params_from_iter(&params))
.context(DbErrorKind::NonFtsInsertionIntoTempSearchTableFailed)
.map_err(|e| e.into())
.map(|_c| ())
@ -1042,7 +1047,7 @@ impl MentatStoring for rusqlite::Connection {
// TODO: consider ensuring we inserted the expected number of rows.
let mut stmt = self.prepare_cached(fts_s.as_str())?;
stmt.execute(&fts_params).context(DbErrorKind::FtsInsertionFailed)?;
stmt.execute(params_from_iter(&fts_params)).context(DbErrorKind::FtsInsertionFailed)?;
// Second, insert searches.
// `params` reference computed values in `block`.
@ -1070,7 +1075,7 @@ impl MentatStoring for rusqlite::Connection {
// TODO: consider ensuring we inserted the expected number of rows.
let mut stmt = self.prepare_cached(s.as_str())?;
stmt.execute(&params).context(DbErrorKind::FtsInsertionIntoTempSearchTableFailed)
stmt.execute(params_from_iter(&params)).context(DbErrorKind::FtsInsertionIntoTempSearchTableFailed)
.map_err(|e| e.into())
.map(|_c| ())
}).collect::<Result<Vec<()>>>();

View file

@ -306,10 +306,9 @@ pub fn transactions_after<S: Borrow<Schema>>(
pub fn fulltext_values(conn: &rusqlite::Connection) -> Result<FulltextValues> {
let mut stmt: rusqlite::Statement =
conn.prepare("SELECT rowid, text FROM fulltext_values ORDER BY rowid")?;
let params: &[i32; 0] = &[];
let r: Result<Vec<_>> = stmt
.query_and_then(params, |row| {
.query_and_then([], |row| {
let rowid: i64 = row.get(0)?;
let text: String = row.get(1)?;
Ok((rowid, text))
@ -341,7 +340,7 @@ pub fn dump_sql_query(
let r: Result<Vec<_>> = stmt
.query_and_then(params, |row| {
for i in 0..row.column_count() {
for i in 0..row.as_ref().column_count() {
let value: rusqlite::types::Value = row.get(i)?;
write!(&mut tw, "{:?}\t", value).unwrap();
}

View file

@ -75,7 +75,7 @@ impl TransactableValue for ValueAndSpan {
}
}
Nil | Boolean(_) | Instant(_) | BigInteger(_) | Float(_) | Uuid(_) | PlainSymbol(_)
| NamespacedSymbol(_) | Vector(_) | Set(_) | Map(_) => {
| NamespacedSymbol(_) | Vector(_) | Set(_) | Map(_) | Bytes(_) => {
bail!(DbErrorKind::InputError(errors::InputError::BadEntityPlace))
}
}
@ -105,7 +105,8 @@ impl TransactableValue for TypedValue {
| TypedValue::Long(_)
| TypedValue::Double(_)
| TypedValue::Instant(_)
| TypedValue::Uuid(_) => {
| TypedValue::Uuid(_)
| TypedValue::Bytes(_) => {
bail!(DbErrorKind::InputError(errors::InputError::BadEntityPlace))
}
}

View file

@ -248,6 +248,7 @@ pub fn update_attribute_map_from_entid_triples(
TypedValue::Ref(entids::DB_TYPE_REF) => { builder.value_type(ValueType::Ref); },
TypedValue::Ref(entids::DB_TYPE_STRING) => { builder.value_type(ValueType::String); },
TypedValue::Ref(entids::DB_TYPE_UUID) => { builder.value_type(ValueType::Uuid); },
TypedValue::Ref(entids::DB_TYPE_BYTES) => { builder.value_type(ValueType::Bytes); },
_ => bail!(DbErrorKind::BadSchemaAssertion(format!("Expected [... :db/valueType :db.type/*] but got [... :db/valueType {:?}] for entid {} and attribute {}", value, entid, attr)))
}
},

View file

@ -362,6 +362,7 @@ impl SchemaTypeChecking for Schema {
(ValueType::Uuid, tv @ TypedValue::Uuid(_)) => Ok(tv),
(ValueType::Instant, tv @ TypedValue::Instant(_)) => Ok(tv),
(ValueType::Keyword, tv @ TypedValue::Keyword(_)) => Ok(tv),
(ValueType::Bytes, tv @ TypedValue::Bytes(_)) => Ok(tv),
// Ref coerces a little: we interpret some things depending on the schema as a Ref.
(ValueType::Ref, TypedValue::Long(x)) => Ok(TypedValue::Ref(x)),
(ValueType::Ref, TypedValue::Keyword(ref x)) => {
@ -379,6 +380,7 @@ impl SchemaTypeChecking for Schema {
| (vt @ ValueType::Uuid, _)
| (vt @ ValueType::Instant, _)
| (vt @ ValueType::Keyword, _)
| (vt @ ValueType::Bytes, _)
| (vt @ ValueType::Ref, _) => {
bail!(DbErrorKind::BadValuePair(format!("{}", value), vt))
}

View file

@ -10,7 +10,7 @@
use std::ops::RangeFrom;
use rusqlite;
use rusqlite::{self, params_from_iter};
use db_traits::errors::{DbErrorKind, Result};
@ -81,10 +81,7 @@ fn move_transactions_to(
new_timeline,
crate::repeat_values(tx_ids.len(), 1)
),
&(tx_ids
.iter()
.map(|x| x as &dyn rusqlite::types::ToSql)
.collect::<Vec<_>>()),
params_from_iter(tx_ids.iter()),
)?;
Ok(())
}

View file

@ -67,6 +67,11 @@ fn test_from_sql_value_pair() {
.unwrap(),
TypedValue::typed_ns_keyword("db", "keyword")
);
assert_eq!(
TypedValue::from_sql_value_pair(rusqlite::types::Value::Blob(vec![1, 2, 3, 42]), 15)
.unwrap(),
TypedValue::Bytes((vec![1, 2, 3, 42]).into())
);
}
#[test]

View file

@ -11,7 +11,7 @@ source "https://rubygems.org"
# gem "jekyll", "~> 3.7.3"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.0"
gem "minima", "~> 2.5.1"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
# uncomment the line below. To upgrade, run `bundle update github-pages`.
@ -19,9 +19,9 @@ gem "minima", "~> 2.0"
# If you have any plugins, put them here!
group :jekyll_plugins do
gem "jekyll-feed", "~> 0.9.3"
gem "github-pages", "~> 186"
gem "jekyll-commonmark-ghpages", "~> 0.1.5"
gem "jekyll-feed", "~> 0.15.1"
gem "github-pages", "~> 215"
gem "jekyll-commonmark-ghpages", "~> 0.1.6"
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

View file

@ -1,148 +1,161 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (4.2.10)
i18n (~> 0.7)
activesupport (6.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.9)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.0.5)
dnsruby (1.60.2)
em-websocket (0.5.1)
concurrent-ruby (1.1.9)
dnsruby (1.61.7)
simpleidn (~> 0.1)
em-websocket (0.5.2)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.11.0)
ffi (>= 1.3.0)
ethon (0.14.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (0.15.2)
execjs (2.8.1)
faraday (1.4.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
multipart-post (>= 1.2, < 3)
ffi (1.9.25)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.1.0)
ffi (1.15.3)
forwardable-extended (2.6.0)
gemoji (3.0.0)
github-pages (186)
activesupport (= 4.2.10)
github-pages-health-check (= 1.8.1)
jekyll (= 3.7.3)
jekyll-avatar (= 0.5.0)
gemoji (3.0.1)
github-pages (215)
github-pages-health-check (= 1.17.2)
jekyll (= 3.9.0)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.5)
jekyll-commonmark-ghpages (= 0.1.6)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.9.3)
jekyll-feed (= 0.15.1)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.9.4)
jekyll-mentions (= 1.3.0)
jekyll-optional-front-matter (= 0.3.0)
jekyll-github-metadata (= 2.13.0)
jekyll-mentions (= 1.6.0)
jekyll-optional-front-matter (= 0.3.2)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.2.0)
jekyll-redirect-from (= 0.13.0)
jekyll-relative-links (= 0.5.3)
jekyll-remote-theme (= 0.3.1)
jekyll-readme-index (= 0.3.0)
jekyll-redirect-from (= 0.16.0)
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.3)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.4.0)
jekyll-sitemap (= 1.2.0)
jekyll-swiss (= 0.4.0)
jekyll-seo-tag (= 2.7.1)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.1.1)
jekyll-theme-cayman (= 0.1.1)
jekyll-theme-dinky (= 0.1.1)
jekyll-theme-hacker (= 0.1.1)
jekyll-theme-hacker (= 0.1.2)
jekyll-theme-leap-day (= 0.1.1)
jekyll-theme-merlot (= 0.1.1)
jekyll-theme-midnight (= 0.1.1)
jekyll-theme-minimal (= 0.1.1)
jekyll-theme-modernist (= 0.1.1)
jekyll-theme-primer (= 0.5.3)
jekyll-theme-primer (= 0.5.4)
jekyll-theme-slate (= 0.1.1)
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.1)
jemoji (= 0.9.0)
kramdown (= 1.16.2)
liquid (= 4.0.0)
listen (= 3.1.5)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.12.0)
kramdown (= 2.3.1)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.4.1)
nokogiri (>= 1.8.2, < 2.0)
rouge (= 2.2.1)
minima (= 2.5.1)
nokogiri (>= 1.10.4, < 2.0)
rouge (= 3.26.0)
terminal-table (~> 1.4)
github-pages-health-check (1.8.1)
github-pages-health-check (1.17.2)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 2.0)
public_suffix (>= 2.0.2, < 5.0)
typhoeus (~> 1.3)
html-pipeline (2.8.0)
html-pipeline (2.14.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.7.3)
jekyll (3.9.0)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
kramdown (>= 1.17, < 3)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.5.0)
jekyll (~> 3.0)
jekyll-avatar (0.7.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.2.0)
jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
jekyll (>= 3.0, < 4.0)
jekyll-commonmark-ghpages (0.1.5)
jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.6)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1)
rouge (~> 2)
jekyll-commonmark (~> 1.2)
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.9.3)
jekyll (~> 3.3)
jekyll-feed (0.15.1)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.9.4)
jekyll (~> 3.1)
jekyll-github-metadata (2.13.0)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
jekyll-mentions (1.3.0)
activesupport (~> 4.0)
jekyll-mentions (1.6.0)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-optional-front-matter (0.3.0)
jekyll (~> 3.0)
jekyll (>= 3.7, < 5.0)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.2.0)
jekyll (~> 3.0)
jekyll-redirect-from (0.13.0)
jekyll (~> 3.3)
jekyll-relative-links (0.5.3)
jekyll (~> 3.3)
jekyll-remote-theme (0.3.1)
jekyll (~> 3.5)
rubyzip (>= 1.2.1, < 3.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.16.0)
jekyll (>= 3.3, < 5.0)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-remote-theme (0.4.3)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0)
rubyzip (>= 1.3.0, < 3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.4.0)
jekyll (~> 3.3)
jekyll-sitemap (1.2.0)
jekyll (~> 3.3)
jekyll-swiss (0.4.0)
jekyll-seo-tag (2.7.1)
jekyll (>= 3.8, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-swiss (1.0.0)
jekyll-theme-architect (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
@ -152,8 +165,8 @@ GEM
jekyll-theme-dinky (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.1)
jekyll (~> 3.5)
jekyll-theme-hacker (0.1.2)
jekyll (> 3.5, < 5.0)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.1)
jekyll (~> 3.5)
@ -170,8 +183,8 @@ GEM
jekyll-theme-modernist (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.3)
jekyll (~> 3.5)
jekyll-theme-primer (0.5.4)
jekyll (> 3.5, < 5.0)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.0)
jekyll-theme-slate (0.1.1)
@ -183,71 +196,82 @@ GEM
jekyll-theme-time-machine (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.1)
jekyll (~> 3.3)
jekyll-watch (2.0.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.9.0)
activesupport (~> 4.0, >= 4.2.9)
jemoji (0.12.0)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (~> 3.0)
kramdown (1.16.2)
liquid (4.0.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
jekyll (>= 3.0, < 5.0)
kramdown (2.3.1)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.3)
listen (3.5.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.3.0)
minima (2.4.1)
jekyll (~> 3.5)
mini_portile2 (2.6.1)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.11.3)
multipart-post (2.0.0)
nokogiri (1.8.3)
mini_portile2 (~> 2.3.0)
octokit (4.9.0)
minitest (5.14.4)
multipart-post (2.1.1)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
octokit (4.21.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.1)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (2.0.5)
rb-fsevent (0.10.3)
rb-inotify (0.9.10)
ffi (>= 0.5.0, < 2)
rouge (2.2.1)
ruby-enum (0.7.2)
public_suffix (4.0.6)
racc (1.5.2)
rb-fsevent (0.11.0)
rb-inotify (0.10.1)
ffi (~> 1.0)
rexml (3.2.5)
rouge (3.26.0)
ruby-enum (0.9.0)
i18n
ruby_dep (1.5.0)
rubyzip (1.2.1)
safe_yaml (1.0.4)
sass (3.5.6)
ruby2_keywords (0.0.4)
rubyzip (2.3.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.1)
addressable (>= 2.3.5, < 2.6)
faraday (~> 0.8, < 1.0)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
simpleidn (0.2.1)
unf (~> 0.1.4)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.3.0)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.5)
tzinfo (1.2.9)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (1.7.0)
zeitwerk (2.4.2)
PLATFORMS
ruby
DEPENDENCIES
github-pages (~> 186)
jekyll-commonmark-ghpages (~> 0.1.5)
jekyll-feed (~> 0.9.3)
minima (~> 2.0)
github-pages (~> 215)
jekyll-commonmark-ghpages (~> 0.1.6)
jekyll-feed (~> 0.15.1)
minima (~> 2.5.1)
tzinfo-data
BUNDLED WITH
1.16.2
2.2.21

View file

@ -11,14 +11,16 @@ readme = "./README.md"
[dependencies]
chrono = "~0.4"
itertools = "~0.9"
num = "~0.3"
ordered-float = "~2.0"
pretty = "~0.10"
uuid = { version = "~0.8", features = ["v4", "serde"] }
itertools = "~0.10"
num = "~0.4"
ordered-float = "~2.8"
pretty = "~0.12"
uuid = { version = "~1", features = ["v4", "serde"] }
serde = { version = "~1.0", optional = true }
serde_derive = { version = "~1.0", optional = true }
peg = "~0.6"
peg = "~0.8"
bytes = "1.0.1"
hex = "0.4.3"
[dev-dependencies]
serde_test = "~1.0"

View file

@ -8,7 +8,9 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
extern crate bytes;
extern crate chrono;
extern crate hex;
extern crate itertools;
extern crate num;
extern crate ordered_float;
@ -38,7 +40,9 @@ pub mod value_rc;
pub use crate::value_rc::{Cloned, FromRc, ValueRc};
// Re-export the types we use.
use bytes::Bytes;
pub use chrono::{DateTime, Utc};
use hex::decode;
pub use num::BigInt;
pub use ordered_float::OrderedFloat;
pub use uuid::Uuid;
@ -124,7 +128,7 @@ peg::parser!(pub grammar parse() for str {
// result = r#""foo\\bar""#
// For the typical case, string_normal_chars will match multiple, leading to a single-element vec.
pub rule raw_text() -> String = "\"" t:((string_special_char() / string_normal_chars())*) "\""
{ t.join(&"") }
{ t.join("") }
pub rule text() -> SpannedValue
= v:raw_text() { SpannedValue::Text(v) }
@ -149,16 +153,16 @@ peg::parser!(pub grammar parse() for str {
"#instmicros" whitespace()+ d:$( digit()+ ) {
let micros = d.parse::<i64>().unwrap();
let seconds: i64 = micros / 1_000_000;
let nanos: u32 = ((micros % 1_000_000).abs() as u32) * 1000;
Utc.timestamp(seconds, nanos)
let nanos: u32 = ((micros % 1_000_000).unsigned_abs() as u32) * 1000;
Utc.timestamp_opt(seconds, nanos).unwrap()
}
rule inst_millis() -> DateTime<Utc> =
"#instmillis" whitespace()+ d:$( digit()+ ) {
let millis = d.parse::<i64>().unwrap();
let seconds: i64 = millis / 1000;
let nanos: u32 = ((millis % 1000).abs() as u32) * 1_000_000;
Utc.timestamp(seconds, nanos)
let nanos: u32 = ((millis % 1000).unsigned_abs() as u32) * 1_000_000;
Utc.timestamp_opt(seconds, nanos).unwrap()
}
rule inst() -> SpannedValue = t:(inst_millis() / inst_micros() / inst_string())
@ -172,6 +176,14 @@ peg::parser!(pub grammar parse() for str {
pub rule uuid() -> SpannedValue = "#uuid" whitespace()+ u:uuid_string()
{ SpannedValue::Uuid(u) }
rule byte_buffer() -> Bytes =
u:$( hex()+ ) {
let b = decode(u).expect("this is a valid hex byte string");
Bytes::copy_from_slice(&b)
}
pub rule bytes() -> SpannedValue = "#bytes" whitespace()+ u:byte_buffer()
{ SpannedValue::Bytes(u) }
rule namespace_divider() = "."
rule namespace_separator() = "/"
@ -219,7 +231,7 @@ peg::parser!(pub grammar parse() for str {
// Note: It's important that float comes before integer or the parser assumes that floats are integers and fails to parse.
pub rule value() -> ValueAndSpan =
__ start:position!() v:(nil() / nan() / infinity() / boolean() / number() / inst() / uuid() / text() / keyword() / symbol() / list() / vector() / map() / set()) end:position!() __ {
__ start:position!() v:(nil() / nan() / infinity() / boolean() / number() / inst() / uuid() / bytes() / text() / keyword() / symbol() / list() / vector() / map() / set() ) end:position!() __ {
ValueAndSpan {
inner: v,
span: Span::new(start, end)

View file

@ -121,7 +121,7 @@ impl NamespaceableName {
if name.starts_with('_') {
Self::new(self.namespace(), &name[1..])
} else {
Self::new(self.namespace(), &format!("_{}", name))
Self::new(self.namespace(), format!("_{}", name))
}
}
@ -205,8 +205,8 @@ impl fmt::Display for NamespaceableName {
// friendly and automatic (e.g. `derive`d), and just pass all work off to it in our custom
// implementation of Serialize and Deserialize.
#[cfg(feature = "serde_support")]
#[cfg_attr(feature = "serde_support", serde(rename = "NamespaceableName"))]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde_support", serde(rename = "NamespaceableName"))]
struct SerializedNamespaceableName<'a> {
namespace: Option<&'a str>,
name: &'a str,

View file

@ -57,10 +57,11 @@ impl Value {
{
let open = open.into();
let n = open.len() as isize;
let i = vs
.into_iter()
.map(|v| v.as_doc(allocator))
.intersperse(allocator.line());
let i = {
let this = vs.into_iter().map(|v| v.as_doc(allocator));
let element = allocator.line();
Itertools::intersperse(this, element)
};
allocator
.text(open)
.append(allocator.concat(i).nest(n))
@ -81,11 +82,14 @@ impl Value {
Value::List(ref vs) => self.bracket(pp, "(", vs, ")"),
Value::Set(ref vs) => self.bracket(pp, "#{", vs, "}"),
Value::Map(ref vs) => {
let xs = vs
.iter()
.rev()
.map(|(k, v)| k.as_doc(pp).append(pp.line()).append(v.as_doc(pp)).group())
.intersperse(pp.line());
let xs = {
let this = vs
.iter()
.rev()
.map(|(k, v)| k.as_doc(pp).append(pp.line()).append(v.as_doc(pp)).group());
let element = pp.line();
Itertools::intersperse(this, element)
};
pp.text("{")
.append(pp.concat(xs).nest(1))
.append(pp.text("}"))
@ -97,7 +101,7 @@ impl Value {
Value::Text(ref v) => pp.text("\"").append(v.as_str()).append("\""),
Value::Uuid(ref u) => pp
.text("#uuid \"")
.append(u.to_hyphenated().to_string())
.append(u.hyphenated().to_string())
.append("\""),
Value::Instant(ref v) => pp
.text("#inst \"")

View file

@ -233,7 +233,7 @@ impl FromValue<FnArg> for FnArg {
{
Some(FnArg::Constant(x.clone().into()))
}
Nil | NamespacedSymbol(_) | Vector(_) | List(_) | Set(_) | Map(_) => None,
Nil | NamespacedSymbol(_) | Vector(_) | List(_) | Set(_) | Map(_) | Bytes(_) => None,
}
}
}
@ -410,6 +410,7 @@ impl FromValue<PatternValuePlace> for PatternValuePlace {
crate::SpannedValue::List(_) => None,
crate::SpannedValue::Set(_) => None,
crate::SpannedValue::Vector(_) => None,
crate::SpannedValue::Bytes(_) => None,
}
}
}
@ -1027,8 +1028,8 @@ impl ParsedQuery {
Ok(ParsedQuery {
find_spec: find_spec.ok_or("expected :find")?,
default_source: SrcVar::DefaultSrc,
with: with.unwrap_or_else(Vec::new), //
in_vars: in_vars.unwrap_or_else(Vec::new),
with: with.unwrap_or_default(),
in_vars: in_vars.unwrap_or_default(),
in_sources: BTreeSet::default(),
limit: limit.unwrap_or(Limit::None),
where_clauses: where_clauses.ok_or("expected :where")?,

View file

@ -27,6 +27,8 @@ use uuid::Uuid;
use crate::symbols;
use bytes::Bytes;
use hex::encode;
/// Value represents one of the allowed values in an EDN string.
#[derive(PartialEq, Eq, Hash, Clone, Debug)]
pub enum Value {
@ -52,6 +54,7 @@ pub enum Value {
// See https://internals.rust-lang.org/t/implementing-hash-for-hashset-hashmap/3817/1
Set(BTreeSet<Value>),
Map(BTreeMap<Value, Value>),
Bytes(Bytes),
}
/// `SpannedValue` is the parallel to `Value` but used in `ValueAndSpan`.
@ -73,6 +76,7 @@ pub enum SpannedValue {
List(LinkedList<ValueAndSpan>),
Set(BTreeSet<ValueAndSpan>),
Map(BTreeMap<ValueAndSpan, ValueAndSpan>),
Bytes(Bytes),
}
/// Span represents the current offset (start, end) into the input string.
@ -172,6 +176,7 @@ impl From<SpannedValue> for Value {
.map(|(x, y)| (x.without_spans(), y.without_spans()))
.collect(),
),
SpannedValue::Bytes(b) => Value::Bytes(b),
}
}
}
@ -328,6 +333,7 @@ macro_rules! def_common_value_methods {
def_is!(is_list, $t::List(_));
def_is!(is_set, $t::Set(_));
def_is!(is_map, $t::Map(_));
def_is!(is_bytes, $t::Bytes(_));
pub fn is_keyword(&self) -> bool {
match self {
@ -360,6 +366,7 @@ macro_rules! def_common_value_methods {
def_as_ref!(as_uuid, $t::Uuid, Uuid);
def_as_ref!(as_symbol, $t::PlainSymbol, symbols::PlainSymbol);
def_as_ref!(as_namespaced_symbol, $t::NamespacedSymbol, symbols::NamespacedSymbol);
def_as_ref!(as_bytes, $t::Bytes, Bytes);
pub fn as_keyword(&self) -> Option<&symbols::Keyword> {
match self {
@ -397,6 +404,7 @@ macro_rules! def_common_value_methods {
def_into!(into_uuid, $t::Uuid, Uuid,);
def_into!(into_symbol, $t::PlainSymbol, symbols::PlainSymbol,);
def_into!(into_namespaced_symbol, $t::NamespacedSymbol, symbols::NamespacedSymbol,);
def_into!(into_bytes, $t::Bytes, Bytes,);
pub fn into_keyword(self) -> Option<symbols::Keyword> {
match self {
@ -467,6 +475,7 @@ macro_rules! def_common_value_methods {
$t::List(_) => 13,
$t::Set(_) => 14,
$t::Map(_) => 15,
$t::Bytes(_) => 16,
}
}
@ -487,6 +496,7 @@ macro_rules! def_common_value_methods {
$t::List(_) => true,
$t::Set(_) => true,
$t::Map(_) => true,
$t::Bytes(_) => false,
}
}
@ -524,6 +534,7 @@ macro_rules! def_common_value_ord {
(&$t::List(ref a), &$t::List(ref b)) => b.cmp(a),
(&$t::Set(ref a), &$t::Set(ref b)) => b.cmp(a),
(&$t::Map(ref a), &$t::Map(ref b)) => b.cmp(a),
(&$t::Bytes(ref a), &$t::Bytes(ref b)) => b.cmp(a),
_ => $value.precedence().cmp(&$other.precedence()),
}
};
@ -558,7 +569,7 @@ macro_rules! def_common_value_display {
}
// TODO: EDN escaping.
$t::Text(ref v) => write!($f, "\"{}\"", v),
$t::Uuid(ref u) => write!($f, "#uuid \"{}\"", u.to_hyphenated().to_string()),
$t::Uuid(ref u) => write!($f, "#uuid \"{}\"", u.hyphenated().to_string()),
$t::PlainSymbol(ref v) => v.fmt($f),
$t::NamespacedSymbol(ref v) => v.fmt($f),
$t::Keyword(ref v) => v.fmt($f),
@ -590,6 +601,10 @@ macro_rules! def_common_value_display {
}
write!($f, " }}")
}
$t::Bytes(ref v) => {
let s = encode(v);
write!($f, "#bytes {}", s)
}
}
};
}
@ -653,7 +668,7 @@ pub trait FromMicros {
impl FromMicros for DateTime<Utc> {
fn from_micros(ts: i64) -> Self {
Utc.timestamp(ts / 1_000_000, ((ts % 1_000_000).abs() as u32) * 1_000)
Utc.timestamp_opt(ts / 1_000_000, ((ts % 1_000_000).unsigned_abs() as u32) * 1_000).unwrap()
}
}
@ -675,7 +690,7 @@ pub trait FromMillis {
impl FromMillis for DateTime<Utc> {
fn from_millis(ts: i64) -> Self {
Utc.timestamp(ts / 1_000, ((ts % 1_000).abs() as u32) * 1_000)
Utc.timestamp_opt(ts / 1_000, ((ts % 1_000).unsigned_abs() as u32) * 1_000).unwrap()
}
}

View file

@ -21,9 +21,9 @@ use crate::types::Value;
/// TODO: implement `merge` for [Value], following the `concat`/`SliceConcatExt` pattern.
pub fn merge(left: &Value, right: &Value) -> Option<Value> {
match (left, right) {
(&Value::Map(ref l), &Value::Map(ref r)) => {
(Value::Map(l), Value::Map(r)) => {
let mut result = l.clone();
result.extend(r.clone().into_iter());
result.extend(r.clone());
Some(Value::Map(result))
}
_ => None,

View file

@ -82,6 +82,7 @@ fn_parse_into_value!(vector);
fn_parse_into_value!(set);
fn_parse_into_value!(map);
fn_parse_into_value!(value);
fn_parse_into_value!(bytes);
#[test]
fn test_nil() {
@ -316,6 +317,38 @@ fn test_uuid() {
assert_eq!(value.to_pretty(100).unwrap(), s);
}
#[test]
fn test_bytes() {
assert!(parse::bytes("#bytes01 ").is_err()); // No whitespace.
assert!(parse::bytes("#bytes _ZZ").is_err()); // No whitespace.
assert!(parse::bytes("#bytes 01 ").is_err()); // No whitespace.
assert!(parse::bytes("#01 ").is_err()); // No whitespace.
let expected = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
let s = format!("{} {}", "#bytes", hex::encode(expected.clone()));
let actual: Value = parse::bytes(&s).expect("parse success").into();
assert!(actual.is_bytes());
assert_eq!(expected, actual.as_bytes().unwrap().to_vec());
assert_eq!(
self::bytes("#bytes 010203050403022a").unwrap(),
Value::Bytes(bytes::Bytes::copy_from_slice(&vec!(
1, 2, 3, 5, 4, 3, 2, 42
)))
);
let data =
r#"[ { :test/instant #inst "2018-01-01T11:00:00Z" :test/bytes #bytes 010203050403022a } ]"#;
let result = parse::value(data).unwrap().without_spans().to_string();
assert_eq!(data, result);
}
#[test]
fn test_entities() {
let d2 = r#"[ { :test/boolean true :test/long 33 :test/double 1.4 :test/string "foo" :test/keyword :foo/bar :test/uuid #uuid "12341234-1234-1234-1234-123412341234" :test/instant #inst "2018-01-01T11:00:00Z" :test/ref 1 :test/bytes #bytes 010203050403022a } ]"#;
let r2 = parse::entities(d2);
assert!(r2.is_ok());
}
#[test]
fn test_inst() {
assert!(parse::value("#inst\"2016-01-01T11:00:00.000Z\"").is_err()); // No whitespace.
@ -584,6 +617,12 @@ fn test_value() {
value("#inst \"2017-04-28T20:23:05.187Z\"").unwrap(),
Instant(Utc.timestamp(1493410985, 187000000))
);
assert_eq!(
value("#bytes 010203050403022a").unwrap(),
Bytes(bytes::Bytes::copy_from_slice(&vec!(
1, 2, 3, 5, 4, 3, 2, 42
)))
);
}
#[test]

View file

@ -1499,7 +1499,7 @@ pub unsafe extern "C" fn query_builder_bind_ref_kw(
let kw = kw_from_string(c_char_to_string(value));
let query_builder = &mut *query_builder;
if let Some(err) = query_builder.bind_ref_from_kw(&var, kw).err() {
panic!(err);
std::panic::panic_any(err);
}
}

View file

@ -16,15 +16,15 @@ syncable = ["tolstoy_traits", "hyper", "serde_json"]
failure = "~0.1"
failure_derive = "~0.1"
http = "~0.2"
tokio = { version = "~0.2", features = ["rt-core"] }
uuid = "~0.8"
tokio = { version = "1.8.0", features = ["full"] }
uuid = "~1.0"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.hyper]
version = "~0.13"
version = "~0.14"
optional = true
[dependencies.serde_json]

View file

@ -19,4 +19,4 @@ path = "../core-traits"
path = "../query-algebrizer-traits"
[dev-dependencies]
itertools = "~0.9"
itertools = "~0.10"

View file

@ -34,6 +34,7 @@ fn prepopulated_schema() -> Schema {
.define_simple_attr("test", "uuid", ValueType::Uuid, false)
.define_simple_attr("test", "instant", ValueType::Instant, false)
.define_simple_attr("test", "ref", ValueType::Ref, false)
.define_simple_attr("test", "bytes", ValueType::Bytes, false)
.schema
}

View file

@ -15,7 +15,7 @@ failure = "~0.1"
failure_derive = "~0.1"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]

View file

@ -110,7 +110,7 @@ impl SimpleAggregationOp {
String => Ok(the_type),
// Unordered types.
Keyword | Ref | Uuid => {
Keyword | Ref | Uuid | Bytes => {
bail!(ProjectorError::CannotApplyAggregateOperationToTypes(
self,
possibilities

View file

@ -8,10 +8,10 @@ sqlcipher = ["rusqlite/sqlcipher"]
[dependencies]
failure = "~0.1"
indexmap = "~1.5"
indexmap = "~1.9"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.core_traits]

View file

@ -123,7 +123,7 @@ impl TupleTwoStagePullProjector {
// There will be at least as many SQL columns as Datalog columns.
// gte 'cos we might be querying extra columns for ordering.
// The templates will take care of ignoring columns.
assert!(row.column_count() >= self.len);
assert!(row.as_ref().column_count() >= self.len);
self.templates
.iter()
.map(|ti| ti.lookup(row))
@ -226,7 +226,7 @@ impl RelTwoStagePullProjector {
// There will be at least as many SQL columns as Datalog columns.
// gte 'cos we might be querying extra columns for ordering.
// The templates will take care of ignoring columns.
assert!(row.column_count() >= self.len);
assert!(row.as_ref().column_count() >= self.len);
let mut count = 0;
for binding in self.templates.iter().map(|ti| ti.lookup(&row)) {
out.push(binding?);

View file

@ -93,7 +93,7 @@ impl TupleProjector {
// There will be at least as many SQL columns as Datalog columns.
// gte 'cos we might be querying extra columns for ordering.
// The templates will take care of ignoring columns.
assert!(row.column_count() >= self.len);
assert!(row.as_ref().column_count() >= self.len);
self.templates
.iter()
.map(|ti| ti.lookup(&row))
@ -163,7 +163,7 @@ impl RelProjector {
// There will be at least as many SQL columns as Datalog columns.
// gte 'cos we might be querying extra columns for ordering.
// The templates will take care of ignoring columns.
assert!(row.column_count() >= self.len);
assert!(row.as_ref().column_count() >= self.len);
let mut count = 0;
for binding in self.templates.iter().map(|ti| ti.lookup(&row)) {
out.push(binding?);

View file

@ -13,7 +13,7 @@ failure = "~0.1"
path = "../query-pull-traits"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]

View file

@ -4,7 +4,7 @@ version = "0.0.2"
workspace = ".."
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]

1
rust-toolchain Normal file
View file

@ -0,0 +1 @@
nightly-2023-11-27

38
shell.nix Normal file
View file

@ -0,0 +1,38 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell rec {
buildInputs = with pkgs; [
# Necessary for the openssl-sys crate:
pkgs.openssl
pkgs.pkg-config
# Compiler
clang
# Replace llvmPackages with llvmPackages_X, where X is the latest LLVM version (at the time of writing, 16)
llvmPackages.bintools
rustup
];
RUSTC_VERSION = pkgs.lib.readFile ./rust-toolchain;
# https://github.com/rust-lang/rust-bindgen#environment-variables
LIBCLANG_PATH = pkgs.lib.makeLibraryPath [ pkgs.llvmPackages_latest.libclang.lib ];
shellHook = ''
export PATH=$PATH:''${CARGO_HOME:-~/.cargo}/bin
export PATH=$PATH:''${RUSTUP_HOME:-~/.rustup}/toolchains/$RUSTC_VERSION-x86_64-unknown-linux-gnu/bin/
'';
# Add precompiled library to rustc search path
RUSTFLAGS = (builtins.map (a: ''-L ${a}/lib'') [
# add libraries here (e.g. pkgs.libvmi)
]);
# Add glibc, clang, glib and other headers to bindgen search path
BINDGEN_EXTRA_CLANG_ARGS =
# Includes with normal include path
(builtins.map (a: ''-I"${a}/include"'') [
# add dev libraries here (e.g. pkgs.libvmi.dev)
pkgs.glibc.dev
])
# Includes with special directory paths
++ [
''-I"${pkgs.llvmPackages_latest.libclang.lib}/lib/clang/${pkgs.llvmPackages_latest.libclang.version}/include"''
''-I"${pkgs.glib.dev}/include/glib-2.0"''
''-I${pkgs.glib.out}/lib/glib-2.0/include/''
];
}

View file

@ -8,10 +8,10 @@ sqlcipher = ["rusqlite/sqlcipher"]
[dependencies]
failure = "~0.1"
ordered-float = "~2.0"
ordered-float = "~2.8"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.core_traits]

View file

@ -181,6 +181,17 @@ impl QueryBuilder for SQLiteQueryBuilder {
let v = Rc::new(rusqlite::types::Value::Text(s.as_ref().to_string()));
self.push_static_arg(v);
}
Bytes(b) => {
let bytes = b.to_vec();
if let Some(arg) = self.byte_args.get(&bytes).cloned() {
// Why, borrow checker, why?!
self.push_named_arg(arg.as_str());
} else {
let arg = self.next_argument_name();
self.push_named_arg(arg.as_str());
self.byte_args.insert(bytes, arg);
}
}
}
Ok(())
}

View file

@ -424,7 +424,7 @@ mod test {
entid: i64,
boolean: bool,
long_val: i64,
};
}
let mut results: Vec<Res> = QueryBuilder::new(
&mut store,

View file

@ -20,6 +20,7 @@ use chrono::FixedOffset;
use core_traits::{Entid, KnownEntid, ValueType, ValueTypeSet};
use edn::OrderedFloat;
use mentat_core::{DateTime, HasSchema, Utc, Uuid};
use query_projector_traits::aggregates::SimpleAggregationOp;
@ -253,7 +254,7 @@ fn test_unbound_inputs() {
fn test_instants_and_uuids() {
// We assume, perhaps foolishly, that the clocks on test machines won't lose more than an
// hour while this test is running.
let start = Utc::now() + FixedOffset::west(60 * 60);
let start = Utc::now() + FixedOffset::west_opt(60 * 60).unwrap();
let mut c = new_connection("").expect("Couldn't open conn.");
let mut conn = Conn::connect(&mut c).expect("Couldn't open DB.");
@ -470,7 +471,7 @@ fn test_fulltext() {
) => {
assert_eq!(x, v);
assert_eq!(text.as_str(), "hello darkness my old friend");
assert_approx_eq!(score, 0.0f64.into());
assert_approx_eq!(score, OrderedFloat(0.0f64));
}
_ => panic!("Unexpected results."),
}
@ -834,6 +835,7 @@ fn test_type_reqs() {
{:db/ident :test/uuid :db/valueType :db.type/uuid :db/cardinality :db.cardinality/one}
{:db/ident :test/instant :db/valueType :db.type/instant :db/cardinality :db.cardinality/one}
{:db/ident :test/ref :db/valueType :db.type/ref :db/cardinality :db.cardinality/one}
{:db/ident :test/bytes :db/valueType :db.type/bytes :db/cardinality :db.cardinality/one}
]"#,
)
.unwrap();
@ -848,7 +850,8 @@ fn test_type_reqs() {
:test/keyword :foo/bar
:test/uuid #uuid "12341234-1234-1234-1234-123412341234"
:test/instant #inst "2018-01-01T11:00:00.000Z"
:test/ref 1}
:test/ref 1
:test/bytes #bytes 010203050403022a }
]"#,
)
.unwrap();
@ -1953,7 +1956,7 @@ fn run_tx_data_test(mut store: Store) {
}
x => panic!("Got unexpected results {:?}", x),
}
};
}
assert_tx_data(&store, &tx1, "1".into());
assert_tx_data(&store, &tx2, "2".into());

View file

@ -1145,7 +1145,7 @@ fn test_upgrade_with_functions() {
)?;
ip.transact_builder(builder).and(Ok(())).map_err(|e| e)
}
};
}
{
let mut in_progress = store.begin_transaction().expect("began");

View file

@ -14,12 +14,12 @@ sqlcipher = ["rusqlite/sqlcipher"]
failure = "~0.1"
failure_derive = "~0.1"
http = "~0.2"
hyper = "~0.13"
hyper = "~0.14"
serde_json = "~1.0"
uuid = { version = "~0.8" }
uuid = { version = "~1" }
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.db_traits]

View file

@ -1,5 +1,5 @@
[package]
edition = "2018"
edition = "2021"
name = "mentat_tolstoy"
version = "0.0.2"
workspace = ".."
@ -11,21 +11,21 @@ sqlcipher = ["rusqlite/sqlcipher"]
[dependencies]
failure = "~0.1"
futures = "~0.3"
hyper = "~0.13"
hyper-tls = "~0.4"
hyper = { version = "~0.14", features = ["full"] }
hyper-tls = "~0.5"
http = "~0.2"
log = "~0.4"
mime = "~0.3"
tokio = { version = "~0.2", features = ["full"] }
tokio = { version = "1.8.0", features = ["full"] }
serde = "~1.0"
serde_json = "~1.0"
serde_cbor = "~0.11"
serde_derive = "~1.0"
lazy_static = "~1.4"
uuid = { version = "~0.8", features = ["v4", "serde"] }
uuid = { version = "~1", features = ["v4", "serde"] }
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]

View file

@ -741,13 +741,14 @@ impl Syncer {
// Since we've "merged" with the remote bootstrap, the "no-op" and
// "local fast-forward" cases are reported as merges.
match Syncer::what_do(remote_state, local_state) {
SyncAction::NoOp => {
Ok(SyncReport::Merge(SyncFollowup::None))
}
SyncAction::NoOp => Ok(SyncReport::Merge(SyncFollowup::None)),
SyncAction::PopulateRemote => {
// This is a programming error.
bail!(TolstoyError::UnexpectedState("Remote state can't be empty on first sync against non-empty remote".to_string()))
bail!(TolstoyError::UnexpectedState(
"Remote state can't be empty on first sync against non-empty remote"
.to_string()
))
}
SyncAction::RemoteFastForward => {
@ -761,12 +762,11 @@ impl Syncer {
SyncAction::CombineChanges => {
let local_txs = Processor::process(
&ip.transaction, Some(local_metadata.root), LocalTxSet::new())?;
Syncer::merge(
ip,
incoming_txs[1..].to_vec(),
local_txs,
)
&ip.transaction,
Some(local_metadata.root),
LocalTxSet::new(),
)?;
Syncer::merge(ip, incoming_txs[1..].to_vec(), local_txs)
}
}
}

View file

@ -20,8 +20,8 @@ test = false
[dependencies]
combine = "~4.6"
dirs = "~3.0"
env_logger = "~0.8"
dirs = "~4.0"
env_logger = "~0.9"
failure = "~0.1"
failure_derive = "~0.1"
getopts = "~0.2"
@ -29,12 +29,14 @@ lazy_static = "~1.4"
linefeed = "~0.6"
log = "~0.4"
tabwriter = "~1.2"
tempfile = "~3.1"
tempfile = "~3.5"
termion = "~1.5"
time = "~0.2"
time = "~0.3"
bytes = { version = "1.0.1", features = ["serde"] }
hex = "0.4.3"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.mentat]

View file

@ -613,6 +613,7 @@ impl Repl {
Ref(r) => format!("{}", r),
String(ref s) => format!("{:?}", s.to_string()),
Uuid(ref u) => format!("{}", u),
Bytes(b) => format!("#bytes {:?}", b.to_vec()),
}
}
}

View file

@ -10,7 +10,7 @@ sqlcipher = ["rusqlite/sqlcipher"]
failure = "~0.1"
[dependencies.rusqlite]
version = "~0.24"
version = "~0.29"
features = ["limits", "bundled"]
[dependencies.edn]