I didn't find that. In fact I did not find any statement about what it actually is.Dolt is a tool to do the management/data entry chores on a server it connects to
That one is a red flag for me.* it will likely not have any idea about transaction isolation levels etc.
Most languages have an API to send UNIX commands and make use of the output. Java and Ruby-on-Rails most certainly have that capacity.* it will not have OO programming features like postgres
* it will almost certainly not work with Ruby-on-Rails.
That's not the point. RoR loads the schema from the DB, and configures all the colums, variable types and associative relations according to what the database provides. You do not configure table contents in the application, instead they get fetched from the database at startup. So you need a database adapter that can understand all the variable types, foreign key constructs etc. and translate them from postgres to ruby and vice versa. This is not just an API for Unix commands.Most languages have an API to send UNIX commands and make use of the output. Java and Ruby-on-Rails most certainly have that capacity.
SELECT "regions".*
FROM regions as hcur,
jsonb_populate_record(null::regions, historical(hcur.log_data, 1626288811948)) as regions
WHERE ... whatever ...
Just so that you know, adding a column to an existing table messes up the database schema. The way most people get around that is by dedicating a column to a timestamp from get-go. I would know, I've worked with real Oracle databases in college and at work. Based on those timestamps, you can hunt down where in your table you messed up. If you want to go back to yesterday, no big deal just looking for today's timestamps and issuing theThat's not the point. RoR loads the schema from the DB, and configures all the colums, variable types and associative relations according to what the database provides. You do not configure table contents in the application, instead they get fetched from the database at startup. So you need a database adapter that can understand all the variable types, foreign key constructs etc. and translate them from postgres to ruby and vice versa. This is not just an API for Unix commands.
Sure, one can always write such an adapter. But I dont want to.
Currently I am testing a tool that logs the history into an extra field in every record via a database trigger on update. The log_data is jsonb, and with a timestamp one can easily "grep" the respective record out of that log. So with a little PL/pgsql to do that "grep", I can swap the current fields with the historical ones in the from clause and do this:
Code:SELECT "regions".* FROM regions as hcur, jsonb_populate_record(null::regions, historical(hcur.log_data, 1626288811948)) as regions WHERE ... whatever ...
And this is fully transparent and can be placed into arbitrary complex joins generated with ruby/arel.
In fact this can run a select with a timestamp and so provide the result as of that time.
(There is still a bunch of things to look into, like how to do soft-deletes, etc.)
DELETE WHERE timestamp=today
SQL command. Straight SQL, any tool like SquirrelSQL will do it for you. And if you wanna play with different versions of today (take an SQL dump into an offline file, modify it, manage via git), you can do that, too.