-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdoc.go
More file actions
55 lines (55 loc) · 2.57 KB
/
Copy pathdoc.go
File metadata and controls
55 lines (55 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// Package drops is a Drizzle-inspired, driver-agnostic SQL toolkit for Go.
//
// The root package defines the [Driver], [Tx], [Rows] and [Result] interfaces
// that adapt the toolkit to any underlying database connection (database/sql,
// pgx, or your own pool) plus the building blocks for composing SQL:
// [Expression] and [Builder].
//
// Observability is provided by [Hook], [ChainHooks], and [CallHook] — a
// single contract shared by every dialect. A ready-made structured hook
// is available via [LoggerHook].
//
// # Dialect packages
//
// - [github.com/bernardoforcillo/drops/pg] — PostgreSQL. Full surface:
// SELECT / INSERT / UPDATE / DELETE, DDL (schemas, enums, sequences,
// views, functions, triggers, indexes), file-based migrations, and
// eager-loaded relations (HasMany, HasOne, BelongsTo, ManyToMany,
// MorphTo, MorphMany). Includes opt-in ORM features: lifecycle
// hooks (OnInsert / OnUpdate / OnDelete), default scopes, typed
// Entity[T] with validators and optimistic locking.
//
// - [github.com/bernardoforcillo/drops/clickhouse] — ClickHouse. Typed
// columns (Array, Nullable, LowCardinality, Decimal, DateTime64, Tuple,
// Map, Enum8/16), full SELECT (PREWHERE, FINAL, SAMPLE, ASOF JOIN,
// SETTINGS), batch INSERT, and the analytics-aggregate library.
//
// - [github.com/bernardoforcillo/drops/qdrant] — Qdrant vector database.
// Stdlib-only HTTP client: collection management, upsert/delete/retrieve,
// search / recommend / scroll, and a Must/Should/MustNot filter DSL.
//
// # Cache packages
//
// - [github.com/bernardoforcillo/drops/cache] — driver-agnostic cache
// interface (Get / Set / Delete / Exists / TTL / Ping / Close) plus a
// MultiCache batch extension and sentinel errors.
//
// - [github.com/bernardoforcillo/drops/cache/memory] — in-process LRU
// cache with TTL and an optional janitor goroutine. Zero deps; ideal
// for tests and the local tier of a two-level cache.
//
// - [github.com/bernardoforcillo/drops/cache/redis] — Redis backend with
// a minimal RESP2 client and a bounded connection pool. Zero deps.
//
// # Adapter
//
// - [github.com/bernardoforcillo/drops/stdlib] — wraps a *sql.DB as a
// drops.Driver so any database/sql driver works with drops out of the box.
//
// # Code generation
//
// - [github.com/bernardoforcillo/drops/cmd/dropsgen] — optional
// binary that emits zero-reflection bind/scan helpers from
// `//drops:entity`-annotated structs. Pair with `go:generate` to
// skip reflection on the hot row-binding path.
package drops