doltlite 0.11.18-x86_64-linux → 0.11.19-x86_64-linux

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c0c1d0fbed2990b42b275ed3da8685aab2ae1d4ba50c4031aff092daa710b26
4
- data.tar.gz: 04c1b8c4d446de57b13a5a0b360a0b221cb8b11a90ce495df4bb1213b62bd587
3
+ metadata.gz: 68615597b92599c6fce31063a505f0e2db29ff46abe3d3e6062362c51b2338cc
4
+ data.tar.gz: d8a2de9bc4db7d997f39ac0a813952299c098d5a9d7b7fb624246dfe4ac53ba6
5
5
  SHA512:
6
- metadata.gz: a21f8a0576c861eb82f6e8e322646f3b9bde15aeaccd84fd3a43cf8cb3af43867f041d77be15847533a2ee5e5c7daee290379279644ef7c2c4b90bf9ae40da6a
7
- data.tar.gz: 2977f181341582d89a2d9d3e7afa83d2fc249998fc98bb11d1ac8dce3f2ecc9c42df636cd078c1a5f915416fa819f925656152295c674a0412e193d2febfe7e8
6
+ metadata.gz: fb5fca3d3c3e677633a53091e9b53ce78fa96a4a666af61887644a30e52eba430acf7ce1ae88fd1ae8e46fa1c1db58ca0cb865b1b5a6caa742ec004816756cf3
7
+ data.tar.gz: 920ad1e8eb5846d3dc2ef4b422a4a9da232de3fa15b1d585c47780a8e78f50e58c41d1f362777d1b7ff897c7ce5a5e2091201c569efe608d2c641866b4728a15
data/README.md CHANGED
@@ -25,7 +25,9 @@ db = Doltlite.open("app.db") # or ":memory:"
25
25
  db.execute("CREATE TABLE notes(id INTEGER PRIMARY KEY, body TEXT)")
26
26
  db.execute("INSERT INTO notes(body) VALUES (?)", "first note")
27
27
 
28
- hash = db.commit(message: "add first note")
28
+ # A Dolt version-control commit (a new entry in dolt_log) — not a SQL
29
+ # transaction COMMIT. Equivalent to db.execute("SELECT dolt_commit('-A','-m',...)").
30
+ hash = db.dolt_commit(message: "add first note")
29
31
  puts "committed #{hash}"
30
32
 
31
33
  db.query("SELECT commit_hash, message FROM dolt_log").each do |commit_hash, message|
@@ -38,6 +40,8 @@ db.close
38
40
  `execute`/`query` take positional bind values (`?`) and return rows as arrays of
39
41
  column values. The `dolt_*` functions and virtual tables (`dolt_log`,
40
42
  `dolt_status`, `dolt_diff`, `dolt_branches`, ...) are invoked through SQL.
43
+ `dolt_commit` is the version-control commit that adds to `dolt_log` — distinct
44
+ from a SQL transaction commit.
41
45
 
42
46
  ## License
43
47
 
@@ -40,17 +40,20 @@ module Doltlite
40
40
  end
41
41
  alias query execute
42
42
 
43
- # Convenience for SELECT dolt_commit(...). Stages everything when all is
44
- # true. Returns the new commit hash.
45
- def commit(message:, all: true)
43
+ # Make a Dolt version-control commit: SELECT dolt_commit(...). This is the
44
+ # version-control operation (a new entry in dolt_log), NOT a SQL
45
+ # transaction COMMIT. Stages everything when all is true. Returns the new
46
+ # commit hash.
47
+ def dolt_commit(message:, all: true)
46
48
  args = all ? ["-A", "-m", message] : ["-m", message]
47
49
  placeholders = (["?"] * args.length).join(", ")
48
50
  rows = execute("SELECT dolt_commit(#{placeholders})", *args)
49
51
  rows.dig(0, 0)
50
52
  end
51
53
 
52
- def version
53
- C.sqlite3_libversion
54
+ # The doltlite version string (SELECT dolt_version()).
55
+ def dolt_version
56
+ execute("SELECT dolt_version()").dig(0, 0)
54
57
  end
55
58
 
56
59
  def close
@@ -1,4 +1,4 @@
1
1
  module Doltlite
2
2
  # Updated per release by the dolthub/doltlite release workflow.
3
- VERSION = "0.11.18"
3
+ VERSION = "0.11.19"
4
4
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: doltlite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.18
4
+ version: 0.11.19
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - DoltHub, Inc.