This commit is contained in:
seb
2026-08-07 05:21:56 +02:00
parent 70e0a9ddc4
commit 396389457f
22 changed files with 225 additions and 242 deletions

View File

@@ -9,8 +9,7 @@ This document is auto-generated from the JSDoc comments in `src/store` by runnin
Creates a new language by its ISO 639 code.
```js
const fn = create(pool);
const id = await fn('de');
const id = await store.lang.create('de');
// => 1
```
@@ -21,8 +20,7 @@ const id = await fn('de');
Deletes a language by its id.
```js
const fn = del(pool);
await fn(1);
await store.lang.delete(1);
```
## `lang.ensure`
@@ -32,8 +30,7 @@ await fn(1);
Returns the id of a language by ISO code, creating it if it does not exist.
```js
const fn = ensure(pool);
const id = await fn('de');
const id = await store.lang.ensure('de');
// => 1
```
@@ -44,9 +41,8 @@ const id = await fn('de');
Returns a language row by its ISO 639 code.
```js
const fn = getByIso639(pool);
const lang = await fn('de');
// => { id, iso639 }
const lang = await store.lang.getByIso639('de');
// => { id: 1, iso639: 'de' }
```
## `lang.list`
@@ -56,7 +52,6 @@ const lang = await fn('de');
Lists all languages.
```js
const fn = list(pool);
const languages = await fn();
// => [{ id, iso639 }]
const languages = await store.lang.list();
// => [{ id: 1, iso639: 'de' }]
```