Comments (2)
Here we have problem with typings, because we do not know all table names and may generate this typings from schemas in certain application.
from metasql.
Couldn't we generate those based on scehmas just like we generate the sql for schemas?
Alsother (much simpler) option would be to just write:
interface CollectionDB {
insert(...);
update(...);
delete(...);
...
}
type DB = {
insert(table: string, ...);
update(table: string, ...);
delete(table: string, ...);
} & { [key: string]: CollectionDB }
from metasql.
Related Issues (20)
- Support RETURNING in Query
- Add console as default logger
- Implement ON UPDATE and ON DELETE with schemas HOT 1
- Registry should not generate `generated always as identity`
- Schema should support array Ids
- Naming problem HOT 1
- Auto create Server HOT 1
- Implement SELECT DISTINCT(...) HOT 2
- Support functions in select HOT 4
- Bug: fix unique constraints
- Bug: fix index generation
- Wrong thenable object in db.select
- Support `null` as value for `update` HOT 1
- Add Database.prototype.on('connect') event
- Duplicate `id` in column name upon declaring a reference to `Identifier` HOT 3
- Working with time-series data and indexes
- Full text search support out of box HOT 2
- Transactions for query builder
- Improve `.returning` syntax
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metasql.