Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table adapters #30

Open
ashalkhakov opened this issue Nov 15, 2017 · 1 comment
Open

Table adapters #30

ashalkhakov opened this issue Nov 15, 2017 · 1 comment

Comments

@ashalkhakov
Copy link

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?

@rspeele
Copy link
Collaborator

rspeele commented Nov 23, 2017

This falls in the category of something I don't plan to work on myself, but would accept PRs for.
(As opposed to other enhancements, which I do plan to work on, but will still probably never get around to).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants