Coder Social home page Coder Social logo

Comments (6)

w3b6x9 avatar w3b6x9 commented on July 23, 2024 2

@soedirgo

TypeScript supports function overloading

This reminds me of Elixir's function arity. Very cool!

from postgres-meta.

soedirgo avatar soedirgo commented on July 23, 2024 1

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.

soedirgo avatar soedirgo commented on July 23, 2024

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.

kiwicopple avatar kiwicopple commented on July 23, 2024

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.

kiwicopple avatar kiwicopple commented on July 23, 2024

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.

github-actions avatar github-actions commented on July 23, 2024

🎉 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.