sql-js / sql-js/sql.js

Extend Database#create_function to support creating deterministic functions

Offen
#551 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
JavaScript
Sterne
13.7k
Forks
1.1k
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Per Application-Defined SQL Functions documentation, custom SQL functions can be marked as deterministic by setting SQLITE_DETERMINISTIC bit. This allows such functions to be used in certain contexts where they otherwise wouldn't be able to such as with the WHERE clause of partial indexes or in generated columns (https://www.sqlite.org/c3ref/c_deterministic.html#sqlitedeterministic).

As a point of reference, the better-sqlite3 library exposes this through the options argument in its Database#function() method. One more option that it exposes through this mechanism is SQLITE_DIRECTONLY bit so it may make sense to support that as well.

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.

Rechercherichtung

Start at the Database#create_function entry point and read SQLite's Application-Defined SQL Functions documentation, especially SQLITE_DETERMINISTIC; compare better-sqlite3's function options as the reference cited in the issue. Done means create_function can mark custom functions as deterministic, with the issue's possible SQLITE_DIRECTONLY support resolved in the API design.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, sqlite
Bereich
api, database
Issue-Typ
Feature
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
48/100

Neue Issues direkt in Ihr Postfach

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