tangled
alpha
login
or
join now
leaflet.pub
/
leaflet
288
fork
atom
a tool for shared writing and social publishing
288
fork
atom
overview
issues
26
pulls
pipelines
fix type of getClientGroup
awarm.space
6 months ago
19377c5e
d8ecbc10
+2
-3
1 changed file
expand all
collapse all
unified
split
src
replicache
utils.ts
+2
-3
src/replicache/utils.ts
···
4
import { replicache_clients } from "drizzle/schema";
5
import type { Attribute, FilterAttributes } from "./attributes";
6
import { ReadTransaction, WriteTransaction } from "replicache";
0
7
8
export function FactWithIndexes(f: Fact<Attribute>) {
9
let indexes: {
10
eav: string;
11
-
aev: string;
12
vae?: string;
13
} = {
14
eav: `${f.entity}-${f.attribute}-${f.id}`,
15
-
aev: `${f.attribute}-${f.entity}-${f.id}`,
16
};
17
if (
18
f.data.type === "reference" ||
···
24
}
25
26
export async function getClientGroup(
27
-
db: PostgresJsDatabase,
28
clientGroupID: string,
29
): Promise<{ [clientID: string]: number }> {
30
let data = await db
···
4
import { replicache_clients } from "drizzle/schema";
5
import type { Attribute, FilterAttributes } from "./attributes";
6
import { ReadTransaction, WriteTransaction } from "replicache";
7
+
import { PgTransaction } from "drizzle-orm/pg-core";
8
9
export function FactWithIndexes(f: Fact<Attribute>) {
10
let indexes: {
11
eav: string;
0
12
vae?: string;
13
} = {
14
eav: `${f.entity}-${f.attribute}-${f.id}`,
0
15
};
16
if (
17
f.data.type === "reference" ||
···
23
}
24
25
export async function getClientGroup(
26
+
db: PgTransaction<any, any, any>,
27
clientGroupID: string,
28
): Promise<{ [clientID: string]: number }> {
29
let data = await db