Skip to content

idempotent table contents #4

@fiddlededee

Description

@fiddlededee

suggested instruction:
/* BASS CONTENTS {table name} [DELIMITER COMMA | TAB | COLON | SEMICOLON | 'USER DELIMITER' ] UPDATE METHOD [REPLACE | UPDATE] [KEEP TRIGGERS [ALL | FOR MATERIALIZED VIEWS | selected trigger] ENABLED] [VERSION {version number}

FILENAME |

INLINE CONTENTS
field1, field2
field1, field2

*/

The idea is to keep checksum for every defined table contents. If checksum (or version) has changed then the contents of table is updated.

Replace method assumes truncating table and inserting new values. Update methods assume inserting new, deleting excess, updating changed.

Operation assumes that indexed and triggers are turned off, but we can explicitly say to leave triggers on. It is necessary, for example, for materialized views.

Indempotent approach may seem resource consuming. But putting table contents to vcs is useful in a limited number of cases. And in most of this cases we need modest tables. That would be good alternative for option field, for example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions