Skip to content

Instantly share code, notes, and snippets.

import * as PgDrizzle from "@effect/sql-drizzle/Pg";
import { PgClient } from "@effect/sql-pg";
import { Config, Effect } from "effect";
import * as schema from "~/lib/server/schema";
const PgLive = PgClient.layerConfig({
url: Config.redacted("DATABASE_URL"),
});
export class DrizzleClient extends Effect.Service<DrizzleClient>()("app/DrizzleClient", {
@cayter
cayter / LICENSE
Last active May 4, 2026 09:22
Drizzle ORM Type-Safe Repository With PgTable
MIT License
Copyright (c) 2022-present, cayter
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@thinkbeforecoding
thinkbeforecoding / deciders-dddeu-2022.fsx
Created June 29, 2022 08:21
Deciders implementation
/// +--------------------------------------+
/// | |
/// | Decider |
/// | |
/// | Jérémie Chassaing |
/// | @thinkb4coding |
/// +--------------------------------------+
// A decider is a structure define by 7 parameters: