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
4
import { replicache_clients } from "drizzle/schema";
5
5
import type { Attribute, FilterAttributes } from "./attributes";
6
6
import { ReadTransaction, WriteTransaction } from "replicache";
7
7
+
import { PgTransaction } from "drizzle-orm/pg-core";
7
8
8
9
export function FactWithIndexes(f: Fact<Attribute>) {
9
10
let indexes: {
10
11
eav: string;
11
11
-
aev: string;
12
12
vae?: string;
13
13
} = {
14
14
eav: `${f.entity}-${f.attribute}-${f.id}`,
15
15
-
aev: `${f.attribute}-${f.entity}-${f.id}`,
16
15
};
17
16
if (
18
17
f.data.type === "reference" ||
···
24
23
}
25
24
26
25
export async function getClientGroup(
27
27
-
db: PostgresJsDatabase,
26
26
+
db: PgTransaction<any, any, any>,
28
27
clientGroupID: string,
29
28
): Promise<{ [clientID: string]: number }> {
30
29
let data = await db