@tricoteuses/senat 3.1.18 → 3.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/src/config.d.ts +0 -22
- package/lib/src/config.js +7 -17
- package/lib/src/conversion_textes.js +1 -5
- package/lib/src/databases.d.ts +2 -0
- package/lib/src/databases.js +26 -0
- package/lib/src/datasets.d.ts +0 -4
- package/lib/src/datasets.js +2 -16
- package/lib/src/git.d.ts +0 -1
- package/lib/src/git.js +11 -45
- package/lib/src/loaders.d.ts +12 -12
- package/lib/src/loaders.js +8 -14
- package/lib/src/model/agenda.d.ts +1 -1
- package/lib/src/model/agenda.js +3 -3
- package/lib/src/model/ameli.d.ts +52 -64
- package/lib/src/model/ameli.js +145 -147
- package/lib/src/model/commission.d.ts +4 -5
- package/lib/src/model/commission.js +6 -6
- package/lib/src/model/debats.d.ts +66 -38
- package/lib/src/model/debats.js +93 -110
- package/lib/src/model/documents.d.ts +12 -32
- package/lib/src/model/documents.js +130 -171
- package/lib/src/model/dosleg.d.ts +5 -142
- package/lib/src/model/dosleg.js +156 -298
- package/lib/src/model/index.d.ts +7 -7
- package/lib/src/model/index.js +7 -7
- package/lib/src/model/questions.d.ts +45 -54
- package/lib/src/model/questions.js +87 -89
- package/lib/src/model/scrutins.d.ts +13 -48
- package/lib/src/model/scrutins.js +111 -118
- package/lib/src/model/seance.d.ts +1 -1
- package/lib/src/model/seance.js +7 -7
- package/lib/src/model/sens.d.ts +179 -109
- package/lib/src/model/sens.js +484 -384
- package/lib/src/model/util.d.ts +8 -0
- package/lib/src/model/util.js +23 -0
- package/lib/src/raw_types/ameli.d.ts +800 -1648
- package/lib/src/raw_types/ameli.js +5 -1074
- package/lib/src/raw_types/debats.d.ts +180 -353
- package/lib/src/raw_types/debats.js +5 -266
- package/lib/src/raw_types/dosleg.d.ts +1523 -2858
- package/lib/src/raw_types/dosleg.js +5 -2005
- package/lib/src/raw_types/questions.d.ts +395 -671
- package/lib/src/raw_types/questions.js +5 -493
- package/lib/src/raw_types/senat.d.ts +11372 -0
- package/lib/src/raw_types/senat.js +5 -0
- package/lib/src/raw_types/sens.d.ts +8148 -7743
- package/lib/src/raw_types/sens.js +5 -4691
- package/lib/src/raw_types_schemats/ameli.d.ts +2 -4
- package/lib/src/raw_types_schemats/debats.d.ts +2 -2
- package/lib/src/raw_types_schemats/dosleg.d.ts +2 -2
- package/lib/src/raw_types_schemats/questions.d.ts +2 -2
- package/lib/src/raw_types_schemats/sens.d.ts +4235 -29
- package/lib/src/scripts/test_iter_load.d.ts +1 -0
- package/lib/src/scripts/test_iter_load.js +12 -0
- package/lib/src/types/ameli.d.ts +4 -4
- package/lib/src/types/dosleg.d.ts +39 -39
- package/lib/src/types/questions.d.ts +2 -2
- package/lib/src/types/sens.d.ts +2 -0
- package/lib/src/types/texte.d.ts +2 -2
- package/lib/src/utils/reunion_odj_building.js +27 -11
- package/package.json +1 -1
- package/lib/src/databases_postgres.d.ts +0 -4
- package/lib/src/databases_postgres.js +0 -23
- package/lib/src/scripts/debug_dosleg_query.d.ts +0 -6
- package/lib/src/scripts/debug_dosleg_query.js +0 -50
package/lib/src/model/util.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
|
+
import { Expression } from "kysely";
|
|
2
|
+
export declare function concat(...exprs: Expression<number | string | null | undefined>[]): import("kysely").RawBuilder<string>;
|
|
3
|
+
export declare function expandToRows(expr: Expression<string | null | undefined>, regexp: Expression<string>): import("kysely").RawBuilder<unknown>;
|
|
4
|
+
export declare function nullIf(expr: Expression<number | string | null | undefined>): import("kysely").RawBuilder<unknown>;
|
|
5
|
+
export declare function removeSubstring(expr: Expression<string | null | undefined>, pattern: Expression<string>): import("kysely").RawBuilder<string>;
|
|
6
|
+
export declare function replace(expr: Expression<string | null | undefined>, pattern: Expression<string>, replacement: Expression<string>): import("kysely").RawBuilder<string>;
|
|
7
|
+
export declare function rtrim(expr: Expression<string | null | undefined>): import("kysely").RawBuilder<string>;
|
|
8
|
+
export declare function toDateString(expr: Expression<Date | null | undefined>, format?: Expression<string>): import("kysely").RawBuilder<string>;
|
|
1
9
|
export declare function toCRDate(dateISO: string, startTime?: string | null): string;
|
package/lib/src/model/util.js
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { sql } from "kysely";
|
|
2
|
+
import { STANDARD_DATE_FORMAT } from "../scripts/datautil";
|
|
3
|
+
export function concat(...exprs) {
|
|
4
|
+
return sql.join(exprs, sql `||`).$castTo();
|
|
5
|
+
}
|
|
6
|
+
export function expandToRows(expr, regexp) {
|
|
7
|
+
return sql `unnest(regexp_matches(${expr}, ${regexp}, 'g'))`;
|
|
8
|
+
}
|
|
9
|
+
export function nullIf(expr) {
|
|
10
|
+
return sql `nullif(trim(${expr}), '')`;
|
|
11
|
+
}
|
|
12
|
+
export function removeSubstring(expr, pattern) {
|
|
13
|
+
return replace(expr, pattern, sql.val(""));
|
|
14
|
+
}
|
|
15
|
+
export function replace(expr, pattern, replacement) {
|
|
16
|
+
return sql `replace(${expr}, ${pattern}, ${replacement})`;
|
|
17
|
+
}
|
|
18
|
+
export function rtrim(expr) {
|
|
19
|
+
return sql `rtrim(${expr})`;
|
|
20
|
+
}
|
|
21
|
+
export function toDateString(expr, format = sql.val(STANDARD_DATE_FORMAT)) {
|
|
22
|
+
return sql `to_char(${expr}, ${format})`;
|
|
23
|
+
}
|
|
1
24
|
export function toCRDate(dateISO, startTime) {
|
|
2
25
|
const yyyymmdd = dateISO.replace(/-/g, ""); // "20250716"
|
|
3
26
|
let hh = "00", mm = "00", ss = "00", SSS = "000";
|