Skip to content

Table adapters #30

@ashalkhakov

Description

@ashalkhakov

Here's a simple scenario: you have a very basic table and you want to perform basic operations on it (SELECT, INSERT, UPDATE, DELETE), e.g.:

type Adapter = TableAdapter<"SomeTable">

That means we get this code generated, roughly:

type Adapter = {
     Select: SQL<"select * from SomeTable">
     Insert: SQL<"insert into SomeTable(...) values (...)">
     Update: SQL<"update SomeTable set (...) where ...">
     Delete: SQL<"delete SomeTable where ...">
   }

Should be enough for a dead-simple CRUD requirement.

This could get complicated with default values etc., so it should be sufficient to simply mandate usage of all columns. For a more complicated scenario, Date&Darwen's Tutorial D view update system could be considered (but I think it's not that useful in practice).

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions