Upgrade to Pro — share decks privately, control downloads, hide ads and more …

PostgreSQL + Rest = pRest

PostgreSQL + Rest = pRest

Felipe Oliveira

August 04, 2018
Tweet

More Decks by Felipe Oliveira

Other Decks in Programming

Transcript

  1. Who we are? Felipe Paes de Oliveira Tech Lead at

    Nuveo Database Specialist at Timbira Fabrízio de Royes Mello
  2. Agenda • Why pREST born? • Why do not use

    Postgrest? • How to use pREST? • What are the pros and cons of pREST in a Software Engineer vision? • What are the pros and cons of pREST in a Database Specialist vision? • What have on the pREST roadmap?
  3. About pREST • Born at Nuveo; • Written in Go;

    • Nuveo Core V2 and others projects starting in parallel; • To optimize time in some basic features creation that involves just to interact database.
  4. Why pREST born? • Born at Nuveo; • Written in

    Go; • Nuveo Core V2 and others projects starting in parallel; • To optimize time in some basic features creation that involves just to interact database.
  5. Why do not use Postgrest? • Postgrest: https://postgrest.org • Postgrest

    is written in Haskell • Difficult to Hire • 1 Dev at Nuveo knows about Haskell
  6. Features • CRUD • Where • Join • Group By

    • Like • JSONB • Permission • Scripts • Migration • More in https://postgres.rest
  7. Tables Permission [access] restrict = true # can access only

    the tables listed below [[access.tables]] name = "test" permissions = ["read", "write", "delete"] fields = ["id", "name"] [[access.tables]] name = "testarray" permissions = ["read", "write", "delete"] fields = ["id", "data"]
  8. Migration prest migrate --url driver://url --path ./migrations create migration_file_xyz prest

    migrate --url driver://url --path ./migrations up prest migrate --url driver://url --path ./migrations down prest migrate --url driver://url --path ./migrations redo prest migrate --url driver://url --path ./migrations reset prest migrate --url driver://url --path ./migrations version prest migrate --url driver://url --path ./migrations next +1 prest migrate --url driver://url --path ./migrations next +2 prest migrate --url driver://url --path ./migrations next -n prest migrate --url driver://url --path ./migrations goto 1 prest migrate --url driver://url --path ./migrations goto 10 prest migrate --url driver://url --path ./migrations goto v
  9. What is next? • Transaction support • Rewrite the CLI

    to make more user friendly • Background Worker???