Comments (6)
TypeScript supports function overloading
This reminds me of Elixir's function arity. Very cool!
from postgres-meta.
I'm done refactoring the API to use the functions above (really liking retrieve
, and TypeScript supports function overloading apparently).
I'll try to finish this off tonight and run it through you tomorrow during cafe day. Sorry this took a while!
from postgres-meta.
Interesting, I suppose the API can be safely split off since the server is just for serving requests.
For making requests from the CLI, we can probably use openapi-generator as @steve-chavez recommended here. Also, do we plan to use Node/TypeScript for the CLI?
from postgres-meta.
do we plan to use Node/TypeScript for the CLI?
Yeah I had a play with Gluegun on the weekend and it seems like it could do the job. TBD though - I have only experimented with some small use-cases (generating TypeScript models/entities from the database).
from postgres-meta.
We have started this process here: #87
And @soedirgo has outlined how it might look eventually here: https://github.com/soedirgo/postgres-meta
One thought: we have several functions like getAll()
, getById()
, getByName()
etc. How would you feel about creating a common interface, where the params
determine the private function:
- list()
- retrieve(params) - For example, takes one of:
{ id?: number, name?: string }
- create()
- update()
- remove()
from postgres-meta.
🎉 This issue has been resolved in version 0.15.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
from postgres-meta.
Related Issues (20)
- v0.61.1 introduces bug in typescript generation for computed column HOT 3
- Unable to run postgres-meta development
- typescript generated type of pgvector/vector is string HOT 5
- Generate types for foreign tables HOT 5
- Generating types for a postgresql array results in Typescript unknown property HOT 4
- Feat: Indexes HOT 1
- supabase gen types generates duplicate identifiers HOT 3
- gentype producing wrong type for inner join HOT 1
- Typegen is not respecting unique table constraint HOT 3
- Permission denied error when generating types HOT 3
- SSL connection error with "PG_META_DB_SSL_ROOT_CERT" and "rejectUnauthorized" misconfiguration HOT 3
- Stopping the container is slow, resorting to SIGKILL
- How to get online postgre-meta version? HOT 1
- Generate types: "Json" type is incompatible with other types HOT 6
- Hardcoded metadata resulting in broken TypeScript type generation from the Supabase CLI HOT 1
- sslmode=require ignored on postgresql URL with gen types --db-url HOT 3
- Gen type throws an exception when table has no columns HOT 2
- Type generation script does not pick up correct type when a SQL function returns data from other table HOT 1
- Composite types can be null
- Generated DB types do not include function property in Table HOT 1
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 postgres-meta.