stackql / stackql/stackql-devel

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

Offen
#97 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@general-kroll-4-life arbeitet bereits daran.

Seit 23.8.2024.

enhancement
Vorherrschende Sprache
Go
Sterne
0
Forks
0
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.