Giter Site home page Giter Site logo

Lagging behind about temporal_tables HOT 1 CLOSED

nearform avatar nearform commented on June 28, 2024
Lagging behind

from temporal_tables.

Comments (1)

paolochiodi avatar paolochiodi commented on June 28, 2024

Hi.

The idea behind this extension is that history table contains all previous states of a record and the actual table contains the current version of the record.

So:

  1. INSERT INTO subscriptions (name, state) VALUES ('test1', 'inserted');
  2. subscriptions table contains inserted, subscriptions_history is empty
  3. UPDATE subscriptions SET state = 'updated' WHERE name = 'test1';
  4. subscriptions contains updated, subscription_history contains inserted
  5. DELETE FROM subscriptions WHERE name = 'test1';
  6. subscriptions is empty, subscription_history contains inserted and updated

The best way to think about it is that every change to a record in subscriptions will store the previous state of that record in subscriptions_history.

You can see the expected behaviour in the tests: https://github.com/nearform/temporal_tables/blob/master/test/expected/versioning.out#L128

This should be the same behaviour of the original c extension that we ported.

from temporal_tables.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.