Skip to content

Table adapters #30

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

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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy