From cdbf0609397e1515110ca3113fffae89acb0b8f2 Mon Sep 17 00:00:00 2001 From: eugene Date: Sun, 6 Feb 2022 17:20:23 -0800 Subject: [PATCH] Update _testoutput format (#19) * update test output format to include test name (and other future context) * save test output for the example tests * update test output format to support multiple keys --- README.md | 2 +- dbtest/test.go | 51 ++- ..._empty_db_delete_with_no_match_is_nop.json | 7 +- ...active_set_overlaps_multiple_versions.json | 87 ++--- ...sting_entry_no_valid_end_basic_delete.json | 39 ++- ...r_if_end_valid_time_before_valid_time.json | 23 +- ...before_valid_time_default_valid_time_.json | 23 +- ...if_end_valid_time_equal_to_valid_time.json | 23 +- ..._end_set_w_valid_time_end_no_overhang.json | 23 +- ...iginal_record_overhands_on_both_sides.json | 55 +-- .../TestGet_empty_db_not_found.json | 7 +- ...update_as_of_valid_time_before_update.json | 39 ++- ...me_before_update_as_of_valid_time_now.json | 39 ++- ...me_now_as_of_valid_time_before_update.json | 39 ++- ...id_time_not_found_default_as_of_times.json | 39 ++- ...update_as_of_valid_time_before_update.json | 55 +-- ...me_before_update_as_of_valid_time_now.json | 55 +-- ...me_now_as_of_valid_time_before_update.json | 55 +-- ..._valid_time_found_default_as_of_times.json | 55 +-- ...no_end_found_as_of_tx_time_T_in_range.json | 23 +- ...d_as_of_tx_time_T_in_range_inclusive_.json | 23 +- ...end_found_as_of_valid_time_T_in_range.json | 23 +- ...s_of_valid_time_T_in_range_inclusive_.json | 23 +- ..._set_no_end_found_default_as_of_times.json | 23 +- ..._as_of_tx_time_T_before_tx_time_start.json | 23 +- ..._valid_time_T_before_valid_time_start.json | 23 +- ...nd_as_of_valid_and_tx_time_T_in_range.json | 23 +- ..._of_valid_time_T_after_valid_time_end.json | 23 +- ..._T_equal_to_valid_time_end_exclusive_.json | 23 +- ...ith_end_not_found_default_as_of_times.json | 23 +- .../TestHistory_empty_db_not_found.json | 7 +- ...r_valid_time_returns_deleted_versions.json | 39 ++- ...action_time_descending_end_valid_time.json | 55 +-- ...action_time_descending_end_valid_time.json | 39 ++- ...gle_set_no_end_basic_return_1_version.json | 23 +- ...e_set_with_end_basic_return_1_version.json | 23 +- ...action_time_descending_end_valid_time.json | 39 ++- ...ist_A_B_values_found_as_of_valid_time.json | 23 +- ..._A_B_values_found_default_as_of_times.json | 23 +- ...lues_not_found_as_of_transaction_time.json | 23 +- ...st_A_values_found_default_as_of_times.json | 23 +- .../TestList_empty_db_not_found.json | 7 +- memory/_testoutput/TestRobinhoodExample.json | 51 +++ .../TestSet_empty_db_basic_set.json | 23 +- ...et_empty_db_basic_set_with_valid_time.json | 23 +- ...et_with_valid_time_and_end_valid_time.json | 23 +- ...TestSet_empty_db_can_set_value_of_nil.json | 23 +- ...r_if_end_valid_time_before_valid_time.json | 7 +- ...before_valid_time_default_valid_time_.json | 7 +- ...if_end_valid_time_equal_to_valid_time.json | 7 +- ...error_if_end_valid_time_in_the_future.json | 7 +- ...TestSet_empty_db_error_if_key_not_set.json | 7 +- ...ror_if_start_valid_time_in_the_future.json | 7 +- ...active_set_overlaps_multiple_versions.json | 103 +++--- ...existing_entry_no_valid_end_basic_set.json | 55 +-- ..._end_set_w_valid_time_end_no_overhang.json | 39 ++- ...iginal_record_overhands_on_both_sides.json | 71 ++-- .../TestTXDBCrimeInvestigationExample.json | 331 ++++++++++++++++++ memory/db_examples_test.go | 3 + .../TestGet_empty_db_not_found.json | 7 +- ...update_as_of_valid_time_before_update.json | 63 ++-- ...me_before_update_as_of_valid_time_now.json | 63 ++-- ...me_now_as_of_valid_time_before_update.json | 63 ++-- ...id_time_not_found_default_as_of_times.json | 63 ++-- ...update_as_of_valid_time_before_update.json | 91 ++--- ...me_before_update_as_of_valid_time_now.json | 91 ++--- ...me_now_as_of_valid_time_before_update.json | 91 ++--- ..._valid_time_found_default_as_of_times.json | 91 ++--- ...no_end_found_as_of_tx_time_T_in_range.json | 35 +- ...d_as_of_tx_time_T_in_range_inclusive_.json | 35 +- ...end_found_as_of_valid_time_T_in_range.json | 35 +- ...s_of_valid_time_T_in_range_inclusive_.json | 35 +- ..._set_no_end_found_default_as_of_times.json | 35 +- ..._as_of_tx_time_T_before_tx_time_start.json | 35 +- ..._valid_time_T_before_valid_time_start.json | 35 +- ...nd_as_of_valid_and_tx_time_T_in_range.json | 35 +- ..._of_valid_time_T_after_valid_time_end.json | 35 +- ..._T_equal_to_valid_time_end_exclusive_.json | 35 +- ...ith_end_not_found_default_as_of_times.json | 35 +- .../TestHistory_empty_db_not_found.json | 7 +- ...r_valid_time_returns_deleted_versions.json | 63 ++-- ...action_time_descending_end_valid_time.json | 91 ++--- ...action_time_descending_end_valid_time.json | 63 ++-- ...gle_set_no_end_basic_return_1_version.json | 35 +- ...e_set_with_end_basic_return_1_version.json | 35 +- ...action_time_descending_end_valid_time.json | 63 ++-- ...ist_A_B_values_found_as_of_valid_time.json | 35 +- ..._A_B_values_found_default_as_of_times.json | 35 +- ...lues_not_found_as_of_transaction_time.json | 35 +- ...st_A_values_found_default_as_of_times.json | 35 +- .../TestList_empty_db_not_found.json | 7 +- 91 files changed, 2212 insertions(+), 1380 deletions(-) create mode 100644 memory/_testoutput/TestRobinhoodExample.json create mode 100644 memory/_testoutput/TestTXDBCrimeInvestigationExample.json diff --git a/README.md b/README.md index 0a9a447..4f6d811 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Go Reference](https://pkg.go.dev/badge/github.com/elh/bitempura.svg)](https://pkg.go.dev/github.com/elh/bitempura) [![Build Status](https://github.com/elh/bitempura/actions/workflows/go.yml/badge.svg?branch=main)](https://github.com/elh/bitempura/actions/workflows/go.yml?query=branch%3Amain) [![Go Report Card](https://goreportcard.com/badge/github.com/elh/bitempura)](https://goreportcard.com/report/github.com/elh/bitempura) -[![Go Non-Test Lines Of Code](https://tokei.rs/b1/github/elh/bitempura?category=code)](https://github.com/elh/bitempura/blob/main/.tokeignore) +[![Go Non-Test Lines Of Code](https://tokei.rs/b1/github/elh/bitempura?category=code)](https://github.com/elh/bitempura/blob/main/.tokeignore) *non-test **Bitempura.DB is a simple, [in-memory](https://github.com/elh/bitempura/blob/main/memory/db.go), [bitemporal](https://en.wikipedia.org/wiki/Bitemporal_Modeling) key-value database.** diff --git a/dbtest/test.go b/dbtest/test.go index 729a2c7..4c69bbc 100644 --- a/dbtest/test.go +++ b/dbtest/test.go @@ -311,7 +311,7 @@ func TestGet(t *testing.T, oldValue, newValue Value, dbFn func(kvs []*VersionedK t.Run(fmt.Sprintf("%v: %v", s.fixtures.name, tC.desc), func(t *testing.T) { db, closeFn, err := dbFn(s.fixtures.vKVs()) defer closeFn() - defer writeOutputHistory(db, "A", t.Name()) + defer WriteOutputHistory(db, []string{"A"}, t.Name()) require.Nil(t, err) ret, err := db.Get(tC.key, tC.readOpts...) if tC.expectErrNotFound { @@ -449,7 +449,7 @@ func TestList(t *testing.T, oldValue, newValue Value, dbFn func(kvs []*Versioned t.Run(fmt.Sprintf("%v: %v", s.fixtures.name, tC.desc), func(t *testing.T) { db, closeFn, err := dbFn(s.fixtures.vKVs()) defer closeFn() - defer writeOutputHistory(db, "A", t.Name()) + defer WriteOutputHistory(db, []string{"A"}, t.Name()) require.Nil(t, err) ret, err := db.List(tC.readOpts...) if tC.expectErr { @@ -921,7 +921,7 @@ func TestSet(t *testing.T, dbFn func(kvs []*VersionedKV, clock Clock) (DB, error t.Run(fmt.Sprintf("%v: %v", s.fixtures.name, tC.desc), func(t *testing.T) { clock := &TestClock{} db, err := dbFn(s.fixtures.vKVs(), clock) - defer writeOutputHistory(db, "A", t.Name()) + defer WriteOutputHistory(db, []string{"A"}, t.Name()) require.Nil(t, err) if tC.now != nil { require.Nil(t, clock.SetNow(*tC.now)) @@ -1260,7 +1260,7 @@ func TestDelete(t *testing.T, oldValue, newValue Value, dbFn func(kvs []*Version clock := &TestClock{} db, closeFn, err := dbFn(s.fixtures.vKVs(), clock) defer closeFn() - defer writeOutputHistory(db, "A", t.Name()) + defer WriteOutputHistory(db, []string{"A"}, t.Name()) require.Nil(t, err) if tC.now != nil { require.Nil(t, clock.SetNow(*tC.now)) @@ -1615,7 +1615,7 @@ func TestHistory(t *testing.T, oldValue, newValue Value, dbFn func(kvs []*Versio t.Run(fmt.Sprintf("%v: %v", s.fixtures.name, tC.desc), func(t *testing.T) { db, closeFn, err := dbFn(s.fixtures.vKVs()) defer closeFn() - defer writeOutputHistory(db, "A", t.Name()) + defer WriteOutputHistory(db, []string{"A"}, t.Name()) require.Nil(t, err) ret, err := db.History(tC.key) if tC.expectErrNotFound { @@ -1648,27 +1648,44 @@ func toJSON(v interface{}) string { return string(out) } -func writeOutputHistory(db DB, key, testName string) { +// TestOutput is the format for saving test data for debugging and visualization. +type TestOutput struct { + TestName string + Histories map[string][]*VersionedKV // key -> history +} + +// WriteOutputHistory writes to a file the final "history" for specified keys at the end of a test. This is used for +// debugging and visualization. +func WriteOutputHistory(db DB, keys []string, testName string) { if !outputHistory { return } + + histories := map[string][]*VersionedKV{} + for _, key := range keys { + kvs, err := db.History(key) + if errors.Is(err, ErrNotFound) { + kvs = []*VersionedKV{} + } else if err != nil { + fmt.Printf("failed to get output history for test=%v\n: %v", testName, err) + return + } + histories[key] = kvs + } + o := TestOutput{ + TestName: testName, + Histories: histories, + } + kvsJSON := toJSON(o) + // format test name for file friendliness reg, err := regexp.Compile("[^a-zA-Z0-9]+") if err != nil { log.Fatal(err) } - testName = reg.ReplaceAllString(testName, "_") - - kvs, err := db.History(key) - if errors.Is(err, ErrNotFound) { - kvs = []*VersionedKV{} - } else if err != nil { - fmt.Printf("failed to get output history for test=%v\n: %v", testName, err) - return - } - kvsJSON := toJSON(kvs) + fileName := reg.ReplaceAllString(testName, "_") _ = os.Mkdir(outputDir, 0777) - err = os.WriteFile(fmt.Sprintf("%s/%s.json", outputDir, testName), []byte(kvsJSON), 0644) + err = os.WriteFile(fmt.Sprintf("%s/%s.json", outputDir, fileName), []byte(kvsJSON), 0644) if err != nil { fmt.Printf("failed to write output history for test=%v\n: %v", testName, err) return diff --git a/memory/_testoutput/TestDelete_empty_db_delete_with_no_match_is_nop.json b/memory/_testoutput/TestDelete_empty_db_delete_with_no_match_is_nop.json index 0637a08..6dac0f2 100644 --- a/memory/_testoutput/TestDelete_empty_db_delete_with_no_match_is_nop.json +++ b/memory/_testoutput/TestDelete_empty_db_delete_with_no_match_is_nop.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestDelete/empty_db:_delete_with_no_match_is_nop", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json b/memory/_testoutput/TestDelete_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json index 35b23ab..5bc2a73 100644 --- a/memory/_testoutput/TestDelete_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json +++ b/memory/_testoutput/TestDelete_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json @@ -1,42 +1,47 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-04T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entries._multiple_valid_time_ranges_active:_set_overlaps_multiple_versions", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-04T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_basic_delete.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_basic_delete.json index 55fc216..66ac307 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_basic_delete.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_basic_delete.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_basic_delete", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time.json index e59d780..0a54189 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_error_if_end_valid_time_before_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time_default_valid_time_.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time_default_valid_time_.json index e59d780..561db7e 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time_default_valid_time_.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_before_valid_time_default_valid_time_.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_error_if_end_valid_time_before_valid_time_(default_valid_time)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_equal_to_valid_time.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_equal_to_valid_time.json index e59d780..98fa628 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_equal_to_valid_time.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_error_if_end_valid_time_equal_to_valid_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_error_if_end_valid_time_equal_to_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json index ca20ac1..eaba47c 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_set_w/_valid_time_end._no_overhang", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json index 5328fc0..ee9833a 100644 --- a/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json +++ b/memory/_testoutput/TestDelete_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestDelete/existing_entry_-_no_valid_end:_set_w/_valid_time_end._original_record_overhands_on_both_sides", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_empty_db_not_found.json b/memory/_testoutput/TestGet_empty_db_not_found.json index 0637a08..813fd04 100644 --- a/memory/_testoutput/TestGet_empty_db_not_found.json +++ b/memory/_testoutput/TestGet_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestGet/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json index 55fc216..6056a1f 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json index 55fc216..412ff33 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_now", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json index 55fc216..da9643b 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_now,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json index 55fc216..4ae43a0 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_not_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json index 1cb2beb..1381acd 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json index 1cb2beb..f6b0538 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_now", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json index 1cb2beb..831c9b4 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_now,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json index 1cb2beb..e373702 100644 --- a/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json +++ b/memory/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json index e59d780..149c612 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json +++ b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_tx_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json index e59d780..6a68021 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json +++ b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_tx_time_T_in_range_(inclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json index e59d780..065d425 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json +++ b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_valid_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json index e59d780..4f84111 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json +++ b/memory/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_valid_time_T_in_range_(inclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json b/memory/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json index e59d780..3d216ae 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json +++ b/memory/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json b/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json index e59d780..b145622 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json +++ b/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_not_found_-_as_of_tx_time_T_before_tx_time_start", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json b/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json index e59d780..f1b301c 100644 --- a/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json +++ b/memory/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_not_found_-_as_of_valid_time_T_before_valid_time_start", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json b/memory/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json index 62917d9..30c225e 100644 --- a/memory/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json +++ b/memory/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_found_-_as_of_valid_and_tx_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json b/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json index 62917d9..f24f0c5 100644 --- a/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json +++ b/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_as_of_valid_time_T_after_valid_time_end", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json b/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json index 62917d9..a1a1b34 100644 --- a/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json +++ b/memory/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_as_of_valid_time_T_equal_to_valid_time_end_(exclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json b/memory/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json index 62917d9..ce349b7 100644 --- a/memory/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json +++ b/memory/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_empty_db_not_found.json b/memory/_testoutput/TestHistory_empty_db_not_found.json index 0637a08..06e09f0 100644 --- a/memory/_testoutput/TestHistory_empty_db_not_found.json +++ b/memory/_testoutput/TestHistory_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestHistory/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json b/memory/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json index 55fc216..ad716ff 100644 --- a/memory/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json +++ b/memory/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/initial_set,_and_then_deletion_with_later_valid_time:_returns_\"deleted\"_versions", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/memory/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index 1cb2beb..f88dc1a 100644 --- a/memory/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/memory/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/initial_set,_and_then_set_with_later_valid_time:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/memory/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index 7298354..b9edd5d 100644 --- a/memory/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/memory/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-02T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": "2022-01-04T00:00:00Z" - }, - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" +{ + "TestName": "TestHistory/multiple_versions_have_nil_end_transaction_time:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-02T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": "2022-01-04T00:00:00Z" + }, + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json b/memory/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json index e59d780..cfac65b 100644 --- a/memory/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json +++ b/memory/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/single_set,_no_end:_basic_-_return_1_version", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json b/memory/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json index 62917d9..3dbced1 100644 --- a/memory/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json +++ b/memory/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestHistory/single_set,_with_end:_basic_-_return_1_version", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/memory/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index d728ef1..cf7043c 100644 --- a/memory/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/memory/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "NEW", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-02T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": "2022-01-04T00:00:00Z" +{ + "TestName": "TestHistory/version_has_later_transaction_time_start,_but_earlier_transaction_time_end:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "NEW", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-02T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": "2022-01-04T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestList_A_B_values_found_as_of_valid_time.json b/memory/_testoutput/TestList_A_B_values_found_as_of_valid_time.json index e59d780..2a59ec8 100644 --- a/memory/_testoutput/TestList_A_B_values_found_as_of_valid_time.json +++ b/memory/_testoutput/TestList_A_B_values_found_as_of_valid_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_found_-_as_of_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestList_A_B_values_found_default_as_of_times.json b/memory/_testoutput/TestList_A_B_values_found_default_as_of_times.json index e59d780..510fb2c 100644 --- a/memory/_testoutput/TestList_A_B_values_found_default_as_of_times.json +++ b/memory/_testoutput/TestList_A_B_values_found_default_as_of_times.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json b/memory/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json index e59d780..486a5e4 100644 --- a/memory/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json +++ b/memory/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_not_found_-_as_of_transaction_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestList_A_values_found_default_as_of_times.json b/memory/_testoutput/TestList_A_values_found_default_as_of_times.json index e59d780..e3c3ada 100644 --- a/memory/_testoutput/TestList_A_values_found_default_as_of_times.json +++ b/memory/_testoutput/TestList_A_values_found_default_as_of_times.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "OLD", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A_values:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "OLD", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestList_empty_db_not_found.json b/memory/_testoutput/TestList_empty_db_not_found.json index 0637a08..e47cc89 100644 --- a/memory/_testoutput/TestList_empty_db_not_found.json +++ b/memory/_testoutput/TestList_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestList/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestRobinhoodExample.json b/memory/_testoutput/TestRobinhoodExample.json new file mode 100644 index 0000000..3bf93b9 --- /dev/null +++ b/memory/_testoutput/TestRobinhoodExample.json @@ -0,0 +1,51 @@ +{ + "TestName": "TestRobinhoodExample", + "Histories": { + "user-1": [ + { + "Key": "user-1", + "Value": { + "cash-balance": 90, + "description": "Price Improvement" + }, + "TxTimeStart": "2021-03-21T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2021-03-20T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "user-1", + "Value": { + "cash-balance": 75, + "description": "Stock Purchase" + }, + "TxTimeStart": "2021-03-20T00:00:00Z", + "TxTimeEnd": "2021-03-21T00:00:00Z", + "ValidTimeStart": "2021-03-20T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "user-1", + "Value": { + "cash-balance": 100, + "description": "Deposit" + }, + "TxTimeStart": "2021-03-20T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2021-03-14T00:00:00Z", + "ValidTimeEnd": "2021-03-20T00:00:00Z" + }, + { + "Key": "user-1", + "Value": { + "cash-balance": 100, + "description": "Deposit" + }, + "TxTimeStart": "2021-03-14T00:00:00Z", + "TxTimeEnd": "2021-03-20T00:00:00Z", + "ValidTimeStart": "2021-03-14T00:00:00Z", + "ValidTimeEnd": null + } + ] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_basic_set.json b/memory/_testoutput/TestSet_empty_db_basic_set.json index 0d0690e..88bbff1 100644 --- a/memory/_testoutput/TestSet_empty_db_basic_set.json +++ b/memory/_testoutput/TestSet_empty_db_basic_set.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/empty_db:_basic_set", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time.json b/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time.json index 7ca47a1..ca9857b 100644 --- a/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time.json +++ b/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2021-12-31T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/empty_db:_basic_set_with_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2021-12-31T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time_and_end_valid_time.json b/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time_and_end_valid_time.json index ce4abc6..d0022fc 100644 --- a/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time_and_end_valid_time.json +++ b/memory/_testoutput/TestSet_empty_db_basic_set_with_valid_time_and_end_valid_time.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-02T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2021-12-31T00:00:00Z", - "ValidTimeEnd": "2022-01-01T00:00:00Z" +{ + "TestName": "TestSet/empty_db:_basic_set_with_valid_time_and_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-02T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2021-12-31T00:00:00Z", + "ValidTimeEnd": "2022-01-01T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_can_set_value_of_nil.json b/memory/_testoutput/TestSet_empty_db_can_set_value_of_nil.json index c31065e..b205ad1 100644 --- a/memory/_testoutput/TestSet_empty_db_can_set_value_of_nil.json +++ b/memory/_testoutput/TestSet_empty_db_can_set_value_of_nil.json @@ -1,10 +1,15 @@ -[ - { - "Key": "A", - "Value": null, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/empty_db:_can_set_value_of_nil", + "Histories": { + "A": [ + { + "Key": "A", + "Value": null, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time.json b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time.json index 0637a08..54fc067 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_end_valid_time_before_valid_time", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time_default_valid_time_.json b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time_default_valid_time_.json index 0637a08..e823460 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time_default_valid_time_.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_before_valid_time_default_valid_time_.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_end_valid_time_before_valid_time_(default_valid_time)", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_equal_to_valid_time.json b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_equal_to_valid_time.json index 0637a08..920eaad 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_equal_to_valid_time.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_equal_to_valid_time.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_end_valid_time_equal_to_valid_time", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_in_the_future.json b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_in_the_future.json index 0637a08..e7ee2cb 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_in_the_future.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_end_valid_time_in_the_future.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_end_valid_time_in_the_future", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_key_not_set.json b/memory/_testoutput/TestSet_empty_db_error_if_key_not_set.json index 0637a08..e5be963 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_key_not_set.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_key_not_set.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_key_not_set", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_empty_db_error_if_start_valid_time_in_the_future.json b/memory/_testoutput/TestSet_empty_db_error_if_start_valid_time_in_the_future.json index 0637a08..d57d8e4 100644 --- a/memory/_testoutput/TestSet_empty_db_error_if_start_valid_time_in_the_future.json +++ b/memory/_testoutput/TestSet_empty_db_error_if_start_valid_time_in_the_future.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestSet/empty_db:_error_if_start_valid_time_in_the_future", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json b/memory/_testoutput/TestSet_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json index 013b62d..7075baf 100644 --- a/memory/_testoutput/TestSet_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json +++ b/memory/_testoutput/TestSet_existing_entries_multiple_valid_time_ranges_active_set_overlaps_multiple_versions.json @@ -1,50 +1,55 @@ -[ - { - "Key": "A", - "Value": "New", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-04T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "Newest", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-02T00:00:00Z", - "ValidTimeEnd": "2022-01-04T00:00:00Z" - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": "New", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/existing_entries._multiple_valid_time_ranges_active:_set_overlaps_multiple_versions", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "New", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-04T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "Newest", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-02T00:00:00Z", + "ValidTimeEnd": "2022-01-04T00:00:00Z" + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": "New", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_existing_entry_no_valid_end_basic_set.json b/memory/_testoutput/TestSet_existing_entry_no_valid_end_basic_set.json index ae2d77e..cb78274 100644 --- a/memory/_testoutput/TestSet_existing_entry_no_valid_end_basic_set.json +++ b/memory/_testoutput/TestSet_existing_entry_no_valid_end_basic_set.json @@ -1,26 +1,31 @@ -[ - { - "Key": "A", - "Value": "New", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/existing_entry_-_no_valid_end:_basic_set", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "New", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json b/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json index 3011f7e..fac47f8 100644 --- a/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json +++ b/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_no_overhang.json @@ -1,18 +1,23 @@ -[ - { - "Key": "A", - "Value": "New", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/existing_entry_-_no_valid_end:_set_w/_valid_time_end._no_overhang", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "New", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json b/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json index 2054c5e..a65003a 100644 --- a/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json +++ b/memory/_testoutput/TestSet_existing_entry_no_valid_end_set_w_valid_time_end_original_record_overhands_on_both_sides.json @@ -1,34 +1,39 @@ -[ - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": "New", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-02T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-04T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": "Old", - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-04T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestSet/existing_entry_-_no_valid_end:_set_w/_valid_time_end._original_record_overhands_on_both_sides", + "Histories": { + "A": [ + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": "New", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-02T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": "Old", + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-04T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/memory/_testoutput/TestTXDBCrimeInvestigationExample.json b/memory/_testoutput/TestTXDBCrimeInvestigationExample.json new file mode 100644 index 0000000..80ef86e --- /dev/null +++ b/memory/_testoutput/TestTXDBCrimeInvestigationExample.json @@ -0,0 +1,331 @@ +{ + "TestName": "TestTXDBCrimeInvestigationExample", + "Histories": { + "p1": [ + { + "Key": "p1", + "Value": { + "arrival-time": "2019-01-04T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-04T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p1", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-03T00:00:00Z", + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-03T00:00:00Z", + "ValidTimeEnd": "2019-01-04T00:00:00Z" + }, + { + "Key": "p1", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": "2019-01-03T00:00:00Z" + }, + { + "Key": "p1", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": "2019-01-04T00:00:00Z", + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p1", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-03T00:00:00Z", + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": "2019-01-04T00:00:00Z", + "ValidTimeStart": "2019-01-03T00:00:00Z", + "ValidTimeEnd": null + } + ], + "p2": [ + { + "Key": "p2", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-05T00:00:00Z", + "entry-pt": "SFO" + }, + "TxTimeStart": "2019-01-05T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-05T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p2", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "SFO" + }, + "TxTimeStart": "2019-01-05T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": "2019-01-05T00:00:00Z" + }, + { + "Key": "p2", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "SFO" + }, + "TxTimeStart": "2018-12-31T00:00:00Z", + "TxTimeEnd": "2019-01-05T00:00:00Z", + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": null + } + ], + "p3": [ + { + "Key": "p3", + "Value": { + "arrival-time": "2019-01-08T00:00:00Z", + "departure-time": "2019-01-08T00:00:00Z", + "entry-pt": "SFO" + }, + "TxTimeStart": "2019-01-09T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-09T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2019-01-08T00:00:00Z", + "departure-time": null, + "entry-pt": "SFO" + }, + "TxTimeStart": "2019-01-09T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-08T00:00:00Z", + "ValidTimeEnd": "2019-01-09T00:00:00Z" + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2019-01-08T00:00:00Z", + "departure-time": null, + "entry-pt": "SFO" + }, + "TxTimeStart": "2019-01-08T00:00:00Z", + "TxTimeEnd": "2019-01-09T00:00:00Z", + "ValidTimeStart": "2019-01-08T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-07T00:00:00Z", + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-07T00:00:00Z", + "TxTimeEnd": "2019-01-08T00:00:00Z", + "ValidTimeStart": "2019-01-07T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-04T00:00:00Z", + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": "2019-01-07T00:00:00Z", + "ValidTimeStart": "2019-01-04T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-07T00:00:00Z", + "TxTimeEnd": "2019-01-07T00:00:00Z", + "ValidTimeStart": "2019-01-04T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2018-12-31T00:00:00Z", + "TxTimeEnd": "2019-01-04T00:00:00Z", + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": "2019-01-07T00:00:00Z", + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-08T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-07T00:00:00Z", + "ValidTimeEnd": "2019-01-08T00:00:00Z" + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-07T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-04T00:00:00Z", + "ValidTimeEnd": "2019-01-07T00:00:00Z" + }, + { + "Key": "p3", + "Value": { + "arrival-time": "2018-12-31T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-04T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2018-12-31T00:00:00Z", + "ValidTimeEnd": "2019-01-04T00:00:00Z" + } + ], + "p4": [ + { + "Key": "p4", + "Value": { + "arrival-time": "2019-01-08T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-08T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-08T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p4", + "Value": { + "arrival-time": "2019-01-02T00:00:00Z", + "departure-time": "2019-01-03T00:00:00Z", + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-08T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-03T00:00:00Z", + "ValidTimeEnd": "2019-01-08T00:00:00Z" + }, + { + "Key": "p4", + "Value": { + "arrival-time": "2019-01-02T00:00:00Z", + "departure-time": "2019-01-03T00:00:00Z", + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-03T00:00:00Z", + "TxTimeEnd": "2019-01-08T00:00:00Z", + "ValidTimeStart": "2019-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "p4", + "Value": { + "arrival-time": "2019-01-02T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-02T00:00:00Z", + "ValidTimeEnd": "2019-01-03T00:00:00Z" + }, + { + "Key": "p4", + "Value": { + "arrival-time": "2019-01-02T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-02T00:00:00Z", + "TxTimeEnd": "2019-01-03T00:00:00Z", + "ValidTimeStart": "2019-01-02T00:00:00Z", + "ValidTimeEnd": null + } + ], + "p5": [ + { + "Key": "p5", + "Value": { + "arrival-time": "2019-01-10T00:00:00Z", + "departure-time": null, + "entry-pt": "LA" + }, + "TxTimeStart": "2019-01-10T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-10T00:00:00Z", + "ValidTimeEnd": null + } + ], + "p6": [ + { + "Key": "p6", + "Value": { + "arrival-time": "2019-01-12T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-11T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-11T00:00:00Z", + "ValidTimeEnd": null + } + ], + "p7": [ + { + "Key": "p7", + "Value": { + "arrival-time": "2019-01-11T00:00:00Z", + "departure-time": null, + "entry-pt": "NY" + }, + "TxTimeStart": "2019-01-11T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2019-01-11T00:00:00Z", + "ValidTimeEnd": null + } + ] + } +} \ No newline at end of file diff --git a/memory/db_examples_test.go b/memory/db_examples_test.go index e06373c..5d6e210 100644 --- a/memory/db_examples_test.go +++ b/memory/db_examples_test.go @@ -24,6 +24,8 @@ func TestTXDBCrimeInvestigationExample(t *testing.T) { clock := &dbtest.TestClock{} db, err := memory.NewDB(memory.WithClock(clock)) require.Nil(t, err) + keys := []string{"p1", "p2", "p3", "p4", "p5", "p6", "p7"} + defer dbtest.WriteOutputHistory(db, keys, t.Name()) type Doc map[string]interface{} @@ -308,6 +310,7 @@ func TestRobinhoodExample(t *testing.T) { clock := &dbtest.TestClock{} db, err := memory.NewDB(memory.WithClock(clock)) require.Nil(t, err) + defer dbtest.WriteOutputHistory(db, []string{"user-1"}, t.Name()) type Balance map[string]interface{} diff --git a/sql/_testoutput/TestGet_empty_db_not_found.json b/sql/_testoutput/TestGet_empty_db_not_found.json index 0637a08..813fd04 100644 --- a/sql/_testoutput/TestGet_empty_db_not_found.json +++ b/sql/_testoutput/TestGet_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestGet/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json index ffb7d5d..77856ac 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json index ffb7d5d..1b595c3 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_now", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json index ffb7d5d..23d5403 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_as_of_tx_time_now,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json index ffb7d5d..523ac1d 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_deletion_with_later_valid_time_not_found_default_as_of_times.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_deletion_with_later_valid_time:_not_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json index 0d5ceec..813a25f 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_before_update.json @@ -1,44 +1,49 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json index 0d5ceec..8807805 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_before_update_as_of_valid_time_now.json @@ -1,44 +1,49 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_before_update,_as_of_valid_time_now", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json index 0d5ceec..ace8369 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_as_of_tx_time_now_as_of_valid_time_before_update.json @@ -1,44 +1,49 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_as_of_tx_time_now,_as_of_valid_time_before_update", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json index 0d5ceec..8bed7a1 100644 --- a/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json +++ b/sql/_testoutput/TestGet_initial_set_and_then_set_with_later_valid_time_found_default_as_of_times.json @@ -1,44 +1,49 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/initial_set,_and_then_set_with_later_valid_time:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json index 907645c..bcb7c70 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json +++ b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_tx_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json index 907645c..fb896eb 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json +++ b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_tx_time_T_in_range_inclusive_.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_tx_time_T_in_range_(inclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json index 907645c..1633d07 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json +++ b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_valid_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json index 907645c..7d23818 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json +++ b/sql/_testoutput/TestGet_single_set_no_end_found_as_of_valid_time_T_in_range_inclusive_.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_as_of_valid_time_T_in_range_(inclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json b/sql/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json index 907645c..367bc4f 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json +++ b/sql/_testoutput/TestGet_single_set_no_end_found_default_as_of_times.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json b/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json index 907645c..8581db9 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json +++ b/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_tx_time_T_before_tx_time_start.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_not_found_-_as_of_tx_time_T_before_tx_time_start", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json b/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json index 907645c..0a10344 100644 --- a/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json +++ b/sql/_testoutput/TestGet_single_set_no_end_not_found_as_of_valid_time_T_before_valid_time_start.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestGet/single_set,_no_end:_not_found_-_as_of_valid_time_T_before_valid_time_start", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json b/sql/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json index 63d3296..a074758 100644 --- a/sql/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json +++ b/sql/_testoutput/TestGet_single_set_with_end_found_as_of_valid_and_tx_time_T_in_range.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_found_-_as_of_valid_and_tx_time_T_in_range", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json b/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json index 63d3296..306b877 100644 --- a/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json +++ b/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_after_valid_time_end.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_as_of_valid_time_T_after_valid_time_end", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json b/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json index 63d3296..2169011 100644 --- a/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json +++ b/sql/_testoutput/TestGet_single_set_with_end_not_found_as_of_valid_time_T_equal_to_valid_time_end_exclusive_.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_as_of_valid_time_T_equal_to_valid_time_end_(exclusive)", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json b/sql/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json index 63d3296..ab2679a 100644 --- a/sql/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json +++ b/sql/_testoutput/TestGet_single_set_with_end_not_found_default_as_of_times.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestGet/single_set,_with_end:_not_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_empty_db_not_found.json b/sql/_testoutput/TestHistory_empty_db_not_found.json index 0637a08..06e09f0 100644 --- a/sql/_testoutput/TestHistory_empty_db_not_found.json +++ b/sql/_testoutput/TestHistory_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestHistory/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json b/sql/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json index ffb7d5d..158a7dc 100644 --- a/sql/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json +++ b/sql/_testoutput/TestHistory_initial_set_and_then_deletion_with_later_valid_time_returns_deleted_versions.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/initial_set,_and_then_deletion_with_later_valid_time:_returns_\"deleted\"_versions", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/sql/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index 0d5ceec..763042c 100644 --- a/sql/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/sql/_testoutput/TestHistory_initial_set_and_then_set_with_later_valid_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,44 +1,49 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": null - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-03T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/initial_set,_and_then_set_with_later_valid_time:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": null + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-03T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/sql/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index 7e76e4a..1332fdb 100644 --- a/sql/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/sql/_testoutput/TestHistory_multiple_versions_have_nil_end_transaction_time_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-02T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": "2022-01-04T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" +{ + "TestName": "TestHistory/multiple_versions_have_nil_end_transaction_time:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-02T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": "2022-01-04T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json b/sql/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json index 907645c..b0b2eb0 100644 --- a/sql/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json +++ b/sql/_testoutput/TestHistory_single_set_no_end_basic_return_1_version.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestHistory/single_set,_no_end:_basic_-_return_1_version", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json b/sql/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json index 63d3296..4e094f8 100644 --- a/sql/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json +++ b/sql/_testoutput/TestHistory_single_set_with_end_basic_return_1_version.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-03T00:00:00Z" +{ + "TestName": "TestHistory/single_set,_with_end:_basic_-_return_1_version", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-03T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json b/sql/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json index 21694dc..13ad2e7 100644 --- a/sql/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json +++ b/sql/_testoutput/TestHistory_version_has_later_transaction_time_start_but_earlier_transaction_time_end_return_versions_by_descending_end_transaction_time_descending_end_valid_time.json @@ -1,30 +1,35 @@ -[ - { - "Key": "A", - "Value": { - "balance": 100, - "deleted_at": null, - "is_active": true, - "type": "checking", - "updated_at": "2021-01-02T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": "2022-01-02T00:00:00Z" - }, - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-02T00:00:00Z", - "TxTimeEnd": "2022-01-03T00:00:00Z", - "ValidTimeStart": "2022-01-03T00:00:00Z", - "ValidTimeEnd": "2022-01-04T00:00:00Z" +{ + "TestName": "TestHistory/version_has_later_transaction_time_start,_but_earlier_transaction_time_end:_return_versions_by_descending_end_transaction_time,_descending_end_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 100, + "deleted_at": null, + "is_active": true, + "type": "checking", + "updated_at": "2021-01-02T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": "2022-01-02T00:00:00Z" + }, + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-02T00:00:00Z", + "TxTimeEnd": "2022-01-03T00:00:00Z", + "ValidTimeStart": "2022-01-03T00:00:00Z", + "ValidTimeEnd": "2022-01-04T00:00:00Z" + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestList_A_B_values_found_as_of_valid_time.json b/sql/_testoutput/TestList_A_B_values_found_as_of_valid_time.json index 907645c..25d3f28 100644 --- a/sql/_testoutput/TestList_A_B_values_found_as_of_valid_time.json +++ b/sql/_testoutput/TestList_A_B_values_found_as_of_valid_time.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_found_-_as_of_valid_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestList_A_B_values_found_default_as_of_times.json b/sql/_testoutput/TestList_A_B_values_found_default_as_of_times.json index 907645c..d5ac4d5 100644 --- a/sql/_testoutput/TestList_A_B_values_found_default_as_of_times.json +++ b/sql/_testoutput/TestList_A_B_values_found_default_as_of_times.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json b/sql/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json index 907645c..612c7de 100644 --- a/sql/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json +++ b/sql/_testoutput/TestList_A_B_values_not_found_as_of_transaction_time.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A,_B_values:_not_found_-_as_of_transaction_time", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestList_A_values_found_default_as_of_times.json b/sql/_testoutput/TestList_A_values_found_default_as_of_times.json index 907645c..74bf01e 100644 --- a/sql/_testoutput/TestList_A_values_found_default_as_of_times.json +++ b/sql/_testoutput/TestList_A_values_found_default_as_of_times.json @@ -1,16 +1,21 @@ -[ - { - "Key": "A", - "Value": { - "balance": 0, - "deleted_at": null, - "is_active": false, - "type": "checking", - "updated_at": "2021-01-01T00:00:00Z" - }, - "TxTimeStart": "2022-01-01T00:00:00Z", - "TxTimeEnd": null, - "ValidTimeStart": "2022-01-01T00:00:00Z", - "ValidTimeEnd": null +{ + "TestName": "TestList/A_values:_found_-_default_as_of_times", + "Histories": { + "A": [ + { + "Key": "A", + "Value": { + "balance": 0, + "deleted_at": null, + "is_active": false, + "type": "checking", + "updated_at": "2021-01-01T00:00:00Z" + }, + "TxTimeStart": "2022-01-01T00:00:00Z", + "TxTimeEnd": null, + "ValidTimeStart": "2022-01-01T00:00:00Z", + "ValidTimeEnd": null + } + ] } -] \ No newline at end of file +} \ No newline at end of file diff --git a/sql/_testoutput/TestList_empty_db_not_found.json b/sql/_testoutput/TestList_empty_db_not_found.json index 0637a08..e47cc89 100644 --- a/sql/_testoutput/TestList_empty_db_not_found.json +++ b/sql/_testoutput/TestList_empty_db_not_found.json @@ -1 +1,6 @@ -[] \ No newline at end of file +{ + "TestName": "TestList/empty_db:_not_found", + "Histories": { + "A": [] + } +} \ No newline at end of file