[FEATURE] Support ~~`UPSERT`~~ `REPLACE` in `sqlVerbs` and in front end grammar

Aperta
#97 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@general-kroll-4-life ci sta già lavorando.

Dal 23/8/2024.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

Feature Description
support
UPSERT REPLACE as an alias to UPDATE, helps to differentiate put and patch methods with the same signatures

Example(s)

for the following DML operation:

UPSERT INTO google.compute.firewalls
SET field1 = 'value1'
WHERE project = 'my-project'
AND firewall = 'my-firewall'

would use this resource definition...

    firewalls:
      id: google.compute.firewalls
      name: firewalls
      title: Firewalls
      methods:
...
        update:
          operation:
            $ref: '#/paths/~1projects~1{project}~1global~1firewalls~1{firewall}/put'
          response:
            mediaType: application/json
            openAPIDocKey: '200'
        patch:
          operation:
            $ref: '#/paths/~1projects~1{project}~1global~1firewalls~1{firewall}/patch'
          response:
            mediaType: application/json
            openAPIDocKey: '200'
      sqlVerbs:
...
        upsert:
          - $ref: '#/components/x-stackQL-resources/firewalls/methods/update'
        update:
          - $ref: '#/components/x-stackQL-resources/firewalls/methods/patch'
...

to access the upsert route, treated the same as and update but routed to the proper operation in the path

Lingua principale
Go
Stelle
0
Fork
0
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di stackql/stackql-devel

Tutte le issue di stackql/stackql-devel

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.