Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/PostHog/duckgres
/ functions
Functions
5,901 in github.com/PostHog/duckgres
⨍
Functions
5,901
◇
Types & classes
803
↓ 5 callers
Function
is_workflow_file
(path: str)
scripts/test_impact_plan.py:105
↓ 5 callers
Method
markActiveQueryMetricsError
(err error)
server/query_metrics.go:72
↓ 5 callers
Method
messageLoop
()
server/conn.go:1118
↓ 5 callers
Function
newBillingTestRouter
(store *fakeBillingStore, now time.Time)
controlplane/compute_billing_api_test.go:76
↓ 5 callers
Function
newComputeMeter
(store computeUsageStore, resolveTeam func(orgID string) int64)
controlplane/compute_meter.go:163
↓ 5 callers
Function
newFlightClient
(t *testing.T, port int)
tests/controlplane/flight_ingress_test.go:31
↓ 5 callers
Function
newIsolatedConfigStoreSchema
(t *testing.T)
tests/configstore/helpers_test.go:42
↓ 5 callers
Function
newSessionWithInMemoryDuckDB
(t *testing.T)
duckdbservice/copy_from_stdin_test.go:100
↓ 5 callers
Method
nextHandle
(prefix string)
server/flightsqlingress/ingress.go:1283
↓ 5 callers
Function
observeAcquirePhase
observeAcquirePhase records one attempt of a single acquire phase. err==nil observes outcome=ok, otherwise outcome=error.
controlplane/acquire_metrics.go:86
↓ 5 callers
Function
observeHealthCheck
observeHealthCheck records the result of one health-check probe. Empty result drops the sample.
controlplane/worker_lifecycle_metrics.go:341
↓ 5 callers
Function
observeStrandedSecretReconciled
observeStrandedSecretReconciled records one outcome of the janitor's stranded-secret sweep.
controlplane/worker_lifecycle_metrics.go:296
↓ 5 callers
Method
only
only returns the single event with the given name, failing if there isn't exactly one.
controlplane/provisioner/controller_analytics_test.go:49
↓ 5 callers
Function
org
(name: string, sessions: number)
controlplane/admin/ui/src/lib/fleet.test.ts:91
↓ 5 callers
Function
overrideS3EndpointForCacheProxy
overrideS3EndpointForCacheProxy routes DuckLake S3 traffic through the local cache proxy as a forward HTTP proxy. The proxy runs as a DaemonSet on wor
duckdbservice/cache_proxy.go:90
↓ 5 callers
Function
parseFrame
(stmtName, query string)
server/conn_skip_until_sync_test.go:81
↓ 5 callers
Function
ptrTime
(t time.Time)
tests/configstore/runtime_store_postgres_test.go:2749
↓ 5 callers
Method
queryContextInner
(monitor bool)
server/conn.go:323
↓ 5 callers
Function
readCString
readCString reads a null-terminated string from reader
server/conn_extended_query.go:882
↓ 5 callers
Function
recordQueryLogKafkaWriterEvents
(outcome, reason string, count float64)
server/querylog_kafka_writer.go:112
↓ 5 callers
Function
releaseQueryHandleValue
(handle *QueryHandle)
duckdbservice/flight_handler.go:72
↓ 5 callers
Method
releaseSlot
()
controlplane/session_mgr.go:273
↓ 5 callers
Function
requestedWorkerVCPUs
(profile *WorkerProfile, workerCPURequest string)
controlplane/worker_profile.go:244
↓ 5 callers
Method
reserveClaimedWorker
(ctx context.Context, claimed *configstore.WorkerRecord, assignment *WorkerAssignment)
controlplane/k8s_pool_acquire.go:459
↓ 5 callers
Function
resolveDSNPassword
(dsn, password string)
tests/perf/publisher/publisher.go:361
↓ 5 callers
Function
roleByEmail
roleByEmail builds a fake RoleResolver from an email→role map. Unknown emails resolve to viewer (the production fail-closed default).
controlplane/admin/authz_test.go:25
↓ 5 callers
Method
run
run executes fn (one DuckDB statement) under a timeout. See the attachStepExecer doc comment for the two-layer deadline semantics.
server/attach_timeout.go:123
↓ 5 callers
Method
runExtendedQueryMessage
runExtendedQueryMessage dispatches an extended-query protocol message (Parse/Bind/Describe/Execute/Close), implementing the protocol's error recovery
server/conn_extended_query.go:910
↓ 5 callers
Function
runMacroCases
(t *testing.T, cases []macroCase)
server/pg_compat_macros_test.go:17
↓ 5 callers
Function
seedBundledExtensions
(srcRoot, dstRoot string)
server/server.go:1067
↓ 5 callers
Method
sendPgCursorsRowDescriptionWithFormats
sendPgCursorsRowDescription sends a RowDescription for a pg_cursors query result (single int4 column).
server/conn_cursor.go:220
↓ 5 callers
Method
sendPgStatActivityRowDescriptionWithFormats
sendPgStatActivityRowDescription sends a RowDescription for pg_stat_activity.
server/conn_pg_stat_activity.go:116
↓ 5 callers
Function
sessionBusyStatus
(ok bool)
duckdbservice/flight_handler.go:40
↓ 5 callers
Function
sessionStateLabel
(state: string | undefined)
controlplane/admin/ui/src/lib/session.ts:22
↓ 5 callers
Function
setStringConstant
setStringConstant sets the string value of an AST node that is a string constant.
transpiler/transform/functions.go:525
↓ 5 callers
Function
setSuite
(suite)
scripts/client-compat/clients/node-postgres/test_node_postgres.js:70
↓ 5 callers
Method
set_suite
(self, suite: str)
scripts/client-compat/clients/dbt/test_dbt.py:37
↓ 5 callers
Function
skipQuoted
skipQuoted returns the index just past a quoted region starting at start (where query[start] == quote). Doubled quotes are escapes.
server/usersecrets/classify.go:310
↓ 5 callers
Method
spawnWorker
(ctx context.Context, id int, image string, profile WorkerProfile, publishIdle bool)
controlplane/k8s_pool_spawn.go:37
↓ 5 callers
Function
splitAndTrim
splitAndTrim splits s on sep, trims whitespace from each part, and drops any empty resulting strings.
configresolve/resolve.go:1245
↓ 5 callers
Function
strConst
strConst builds an A_Const string-literal node.
transpiler/transform/literals.go:118
↓ 5 callers
Function
stripLeadingNoise
stripLeadingNoise strips leading whitespace, comments, and parentheses from a query string in a loop until none remain. This handles cases like "(/* c
server/conn.go:1538
↓ 5 callers
Function
sysMode
()
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:337
↓ 5 callers
Function
toNullString
(v any)
server/flightsqlingress/ingress.go:2254
↓ 5 callers
Function
tolerateStatus
(fallback: T, ...statuses: number[])
controlplane/admin/ui/src/hooks/useApi.ts:51
↓ 5 callers
Function
truncateNullableQuery
(q *string)
server/querylog.go:391
↓ 5 callers
Function
truncateQuery
truncateQuery truncates a query string to maxQueryLength.
server/querylog.go:384
↓ 5 callers
Method
unregisterConn
unregisterConn removes a client connection from the registry.
server/server.go:752
↓ 5 callers
Method
visitStatement
(node *pg_query.Node)
transpiler/transform/boolpredicates.go:31
↓ 5 callers
Method
visitWithClause
(withClause *pg_query.WithClause)
transpiler/transform/boolpredicates.go:157
↓ 5 callers
Function
waitForConnectionWaiters
(t *testing.T, sm *SessionManager, want int)
controlplane/session_mgr_test.go:549
↓ 5 callers
Method
walkAndTransform
(node *pg_query.Node, changed *bool)
transpiler/transform/version.go:40
↓ 5 callers
Method
workerBelongsToOrgLocked
(w *ManagedWorker)
controlplane/org_reserved_pool.go:438
↓ 5 callers
Function
workerLogAttrs
workerLogAttrs returns the standard identity attrs for a worker log line: worker id, pod name, and the assigned org (when tenant-bound). Every log lin
controlplane/k8s_pool_helpers.go:193
↓ 5 callers
Method
workerResources
workerResources returns resource requests and limits for a worker pod. Set via DUCKGRES_K8S_WORKER_CPU_REQUEST / DUCKGRES_K8S_WORKER_MEMORY_REQUEST. R
controlplane/k8s_pool_spawn.go:641
↓ 5 callers
Function
workerSnapshotsFromRecords
workerSnapshotsFromRecords converts a record slice to a snapshot slice in one place so the wrapper methods don't each spell out the loop.
controlplane/configstore/lifecycle_store.go:79
↓ 5 callers
Function
writePerfCatalog
(t *testing.T, targets []perfcore.Protocol)
tests/scenario/perf/adapter_test.go:264
↓ 4 callers
Method
ActivateReservedWorker
(ctx context.Context, worker *ManagedWorker)
controlplane/shared_worker_activator.go:110
↓ 4 callers
Method
ActiveOrgConnectionLeaseCount
ActiveOrgConnectionLeaseCount returns the active cluster-wide lease count for an org, ignoring leases owned by expired control-plane instances.
controlplane/configstore/org_connections.go:423
↓ 4 callers
Method
AllSessions
()
controlplane/memory_rebalancer.go:28
↓ 4 callers
Function
BeginRateLimitedAuthAttempt
BeginRateLimitedAuthAttempt enforces rate-limit policy before an auth attempt. The returned release function must be called once the attempt is comple
server/auth/policy.go:12
↓ 4 callers
Method
BeginTx
(context.Context, *sql.TxOptions)
tests/perf/publisher/publisher.go:66
↓ 4 callers
Function
BuildAttachStmt
BuildAttachStmt builds the ATTACH statement for DuckLake. If migrate is true, adds AUTOMATIC_MIGRATION TRUE to the options.
server/ducklake/migration.go:631
↓ 4 callers
Function
CacheKey
CacheKey computes a deterministic cache key from a full URL and byte range. The URL includes scheme, host, path, and query — so different buckets, reg
cmd/cache-proxy/cache.go:66
↓ 4 callers
Method
CancelOrgConnectionRequest
(requestID string, canceledAt time.Time)
controlplane/connection_limiter.go:36
↓ 4 callers
Method
CancelQuery
CancelQuery cancels a running query by its backend key. Returns true if a query was found and cancelled, false otherwise.
server/server.go:720
↓ 4 callers
Method
CloseSession
(ctx context.Context, req *flight.CloseSessionRequest)
server/flightsqlingress/ingress.go:701
↓ 4 callers
Method
CommitMessages
(context.Context, ...QueryLogKafkaConsumedMessage)
server/querylog_kafka_writer.go:64
↓ 4 callers
Function
ConfigureMainDB
ConfigureMainDB applies the per-instance DuckDB settings (threads, memory, temp dir, extensions, profiling) that the client-query DB needs. Shared bet
server/server.go:921
↓ 4 callers
Method
ConnDetailByPID
ConnDetailByPID returns a redacted snapshot of the live connection for pid, or ok=false if no such connection is registered on this server. Used by th
server/exports.go:128
↓ 4 callers
Function
CreateDBConnection
CreateDBConnection creates a DuckDB connection for a client session. Uses in-memory database as an anchor for DuckLake attachment (actual data lives i
server/server.go:1189
↓ 4 callers
Method
CreateSession
CreateSession creates a new DuckDB session for the given username. secretStatements are the user's persistent secrets to replay (shared-warm mode only
duckdbservice/service.go:962
↓ 4 callers
Function
DefaultRateLimitConfig
DefaultRateLimitConfig returns sensible defaults for rate limiting.
server/auth/ratelimit.go:27
↓ 4 callers
Method
DoAction
(ctx context.Context, action *flight.Action, opts ...grpc.CallOption)
controlplane/session_mgr_drain_test.go:390
↓ 4 callers
Method
Execute
(ctx context.Context, query Query, args []any)
tests/perf/core/runner.go:14
↓ 4 callers
Method
Execute
(ctx context.Context, query string, args []any)
tests/perf/drivers/flight/driver.go:19
↓ 4 callers
Method
ExecuteStep
(ctx context.Context, step core.Step)
tests/scenario/provision/steps.go:83
↓ 4 callers
Method
GetStatementHandle
()
duckdbservice/flight_handler_test.go:123
↓ 4 callers
Method
GetTransactionId
()
server/flightsqlingress/ingress_test.go:69
↓ 4 callers
Method
GetTransactionId
()
duckdbservice/flight_handler_test.go:149
↓ 4 callers
Function
InitLogging
InitLogging configures slog to send logs to PostHog via OTLP when POSTHOG_API_KEY is set. Additional PostHog projects can be targeted by setting ADDIT
internal/cliboot/logging.go:269
↓ 4 callers
Function
InitTracing
InitTracing configures an OTLP trace exporter when OTEL_EXPORTER_OTLP_TRACES_ENDPOINT (or DUCKGRES_TRACE_ENDPOINT) is set. When no endpoint is configu
internal/cliboot/tracing.go:21
↓ 4 callers
Function
Installed
Installed reports whether the native crash handler is active.
internal/crashhandler/crashhandler.go:30
↓ 4 callers
Function
IsDuckLakeInfraRunning
IsDuckLakeInfraRunning checks if the DuckLake infrastructure (metadata postgres + minio) is running
tests/integration/harness.go:711
↓ 4 callers
Function
IsReservedName
IsReservedName reports whether a secret name is reserved for system use.
server/usersecrets/classify.go:62
↓ 4 callers
Function
LoadExtensions
LoadExtensions installs and loads DuckDB extensions. This is a standalone function so it can be reused by control plane workers. Extension strings can
server/server.go:1366
↓ 4 callers
Function
MarkDurableReconnectTerminal
(err error)
server/flightsqlingress/ingress.go:49
↓ 4 callers
Function
MigrationNeeded
MigrationNeeded returns whether the ATTACH statement should include AUTOMATIC_MIGRATION TRUE. Safe to call after EnsureMigrationCheck.
server/ducklake/migration.go:94
↓ 4 callers
Function
NeedsBooleanPredicateRewrite
(sql string)
transpiler/boolpredicates.go:18
↓ 4 callers
Function
NewACMEDNSManager
NewACMEDNSManager creates a new ACME DNS-01 manager for the given domain. It uses Route53 to create/delete TXT records for DNS-01 challenge validation
server/tlscert/acme_dns.go:70
↓ 4 callers
Function
NewChildTracker
NewChildTracker creates a new child tracker
server/parent.go:34
↓ 4 callers
Function
NewLatencyProxy
NewLatencyProxy creates a latency proxy listening on a random port, forwarding to the given target address with the specified one-way latency.
tests/integration/latency_proxy.go:25
↓ 4 callers
Function
NewQueryLogSink
NewQueryLogSink creates the configured query-log sink. The default sink is the historical DuckLake-backed system.query_log table.
server/querylog.go:88
↓ 4 callers
Function
POOL_ORDER
(p: string)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:156
↓ 4 callers
Function
ParseStartupOptions
ParseStartupOptions parses the Postgres startup-message `options` parameter, which carries `-c name=value` GUC settings (also accepted: `-cname=value`
server/startup_options.go:14
↓ 4 callers
Method
Parts
Parts returns the persisted/match primitives for the profile, decomposing nil to the default profile. Used to cross the controlplane→configstore packa
controlplane/worker_state.go:59
↓ 4 callers
Method
Port
Port returns the local port the proxy is listening on.
tests/integration/latency_proxy.go:40
↓ 4 callers
Method
PostPeers
PostPeers is FetchPeers for a mutating action: it POSTs path+"?scope=local" to every OTHER replica and returns each peer's raw 200 body plus the numbe
controlplane/admin/live_aggregate.go:31
↓ 4 callers
Method
ProvisionResponse
(orgID string)
tests/scenario/provision/steps.go:63
↓ 4 callers
Method
ReapIdleNow
()
server/flightsqlingress/ingress.go:1858
← previous
next →
701–800 of 5,901, ranked by callers