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
↓ 6 callers
Function
sqlstateClass
(sqlstate: string | undefined)
controlplane/admin/ui/src/lib/errors.ts:54
↓ 6 callers
Function
storeDB
(t *testing.T, store *cpconfigstore.ConfigStore)
tests/configstore/migrations_postgres_test.go:489
↓ 6 callers
Function
strConstNode
(s string)
transpiler/transform/functions_compat.go:260
↓ 6 callers
Function
stripLeadingComments
(query string)
server/conn.go:1533
↓ 6 callers
Function
summarizeAttachStmt
summarizeAttachStmt truncates a statement for log/error output. Attach and secret statements can embed credentials further in, but everything before t
server/attach_timeout.go:217
↓ 6 callers
Function
testFlightHandlerWithStoreAndRateLimiter
(t *testing.T, users map[string]string, rateLimiter *server.RateLimiter)
server/flightsqlingress/ingress_test.go:416
↓ 6 callers
Method
tick
(ctx context.Context)
controlplane/credential_refresh_scheduler.go:71
↓ 6 callers
Function
toString
(v any)
server/flightsqlingress/ingress.go:2267
↓ 6 callers
Method
transformSelectStmt
(stmt *pg_query.SelectStmt)
transpiler/transform/operators.go:81
↓ 6 callers
Function
validateWorkerAssignment
(assignment *WorkerAssignment)
controlplane/worker_state.go:218
↓ 6 callers
Method
withSession
withSession adds the session token to the gRPC context.
server/flightclient/flight_executor.go:135
↓ 6 callers
Function
workerDrainingStatus
(err error)
duckdbservice/flight_handler.go:33
↓ 6 callers
Function
workerImageForOrg
(tc *configstore.OrgConfig, fallback string)
controlplane/org_router.go:330
↓ 6 callers
Method
workerLeaseSnapshot
(w *ManagedWorker)
controlplane/k8s_pool_lifecycle.go:1004
↓ 5 callers
Function
AutoMemoryLimit
AutoMemoryLimit computes a DuckDB memory_limit based on system memory. Formula: totalMem * 0.75, with a floor of 256MB. Every session gets the full bu
server/sysinfo/sysinfo.go:64
↓ 5 callers
Method
Close
Close shuts down the test harness
tests/integration/harness.go:607
↓ 5 callers
Method
Close
Close gracefully shuts down the HTTP challenge listener. Safe to call multiple times.
server/tlscert/acme.go:89
↓ 5 callers
Method
CloseSession
(sessionToken string, closedAt time.Time)
server/flightsqlingress/ingress.go:116
↓ 5 callers
Method
DatabaseNameForSNIPrefix
DatabaseNameForSNIPrefix translates an SNI hostname prefix (the single label before a managed suffix, e.g. "entirely-chief-wildcat") into the canonica
controlplane/configstore/store.go:292
↓ 5 callers
Method
DatabaseTypeName
()
server/sqlcore/interfaces.go:20
↓ 5 callers
Method
Drain
Drain transitions a lease-owned worker into the draining state. This is the first step of ShutdownAll's 3-step chain; it does NOT trigger physical cle
controlplane/worker_lifecycle.go:278
↓ 5 callers
Function
EnrichSpanWithProfiling
EnrichSpanWithProfiling creates child spans from DuckDB profiling output showing where execution time was spent: planning, scanning (I/O), and compute
server/observe/tracing.go:148
↓ 5 callers
Function
Env
Env returns the value of the named environment variable, falling back to defaultVal when unset or empty. Shared by every duckgres binary so the overri
configloader/load.go:28
↓ 5 callers
Method
ExecuteStep
(context.Context, Step)
tests/scenario/core/runner.go:23
↓ 5 callers
Method
ExecuteStep
(ctx context.Context, step core.Step)
tests/scenario/perf/steps.go:127
↓ 5 callers
Method
FetchFromPeers
FetchFromPeers locates a peer holding cacheKey and streams its body into sink, returning the serving peer's address and the number of bytes streamed.
cmd/cache-proxy/peers.go:131
↓ 5 callers
Function
ForName
(name Name)
transpiler/backend/profile.go:85
↓ 5 callers
Method
GetControlPlaneInstance
GetControlPlaneInstance returns a runtime control-plane instance row by id.
controlplane/configstore/store.go:916
↓ 5 callers
Function
InitMacros
InitMacros registers ClickHouse SQL function macros so that ClickHouse-flavoured queries work out of the box against DuckDB. This is a subset of the c
server/chsql/chsql.go:12
↓ 5 callers
Method
IsMigrating
IsMigrating returns true if the org has a DuckLake migration in progress.
controlplane/org_router.go:227
↓ 5 callers
Function
LegacySecretDirectory
LegacySecretDirectory returns DuckDB's pre-pinning default persistent-secret location for a worker whose HOME is its DataDir (<DataDir>/.duckdb/stored
server/server.go:910
↓ 5 callers
Method
ListWorkersDueForCredentialRefresh
(ownerCPInstanceID string, cutoff time.Time)
controlplane/credential_refresh_scheduler.go:23
↓ 5 callers
Method
MarkCredentialsRefreshed
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64, expiresAt time.Time)
controlplane/shared_worker_activator.go:62
↓ 5 callers
Method
MarkWorkerLostIfCurrentLease
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64, reason string)
controlplane/worker_lifecycle.go:38
↓ 5 callers
Function
NewACMEManager
NewACMEManager creates a new ACME manager for the given domain. It starts an HTTP listener on the specified address (default ":80") for HTTP-01 challe
server/tlscert/acme.go:29
↓ 5 callers
Function
NewCipher
NewCipher builds a Cipher from a base64-encoded (std or url, padded or raw) 32-byte key.
server/usersecrets/crypto.go:30
↓ 5 callers
Function
NewExecutor
(cfg ExecutorConfig)
tests/scenario/perf/steps.go:77
↓ 5 callers
Function
NewFlightExecutorFromClient
NewFlightExecutorFromClient creates a FlightExecutor that shares an existing Flight SQL client. The client is NOT closed when this executor is closed.
server/flightclient/flight_executor.go:110
↓ 5 callers
Function
NewWorkerCapacityExhaustedError
(retryAfter time.Duration)
controlplane/worker_pool.go:35
↓ 5 callers
Function
NewWorkerCapacityExhaustedErrorForReason
(reason configstore.WorkerClaimMissReason, retryAfter time.Duration)
controlplane/worker_pool.go:39
↓ 5 callers
Function
ObserveConnectionDuration
ObserveConnectionDuration records one completed connection's lifetime.
server/observe/metrics.go:37
↓ 5 callers
Method
Put
Put stores data in the cache, evicting old entries if needed.
cmd/cache-proxy/cache.go:193
↓ 5 callers
Method
ReconnectFlightSession
(ctx context.Context, username string, workerID int, ownerEpoch int64)
controlplane/session_mgr.go:489
↓ 5 callers
Function
RedactErrorForLog
RedactErrorForLog returns an error message safe to log/store alongside query. When query carries CREATE SECRET DDL anywhere (head or a later top-level
server/usersecrets/redact.go:66
↓ 5 callers
Function
RegisterLogin
RegisterLogin wires the break-glass internal-secret login on the Gin engine. The React SPA (served by RegisterUI) owns "/" and all app routes; the pri
controlplane/admin/dashboard.go:91
↓ 5 callers
Method
Result
(stepID string)
tests/scenario/sql/steps.go:118
↓ 5 callers
Method
RetireDrained
RetireDrained is the third step of ShutdownAll's chain: it transitions a draining row to retired, fenced by the lease. The caller is responsible for t
controlplane/worker_lifecycle.go:315
↓ 5 callers
Function
RowsToRecord
RowsToRecord converts sql.Rows into an Arrow RecordBatch of up to batchSize rows. Returns nil when there are no more rows.
duckdbservice/arrow_helpers.go:35
↓ 5 callers
Method
SetRequestedVCPUsResolver
SetRequestedVCPUsResolver installs the worker-profile-to-vCPU resolver used for resource admission. nil means every session costs one vCPU.
controlplane/session_mgr.go:179
↓ 5 callers
Method
ShutdownAll
()
controlplane/control.go:257
↓ 5 callers
Method
SignalAll
SignalAll sends a signal to all child processes
server/parent.go:87
↓ 5 callers
Method
StackForOrg
(orgID string)
controlplane/control.go:255
↓ 5 callers
Method
State
()
tests/scenario/sql/steps.go:108
↓ 5 callers
Method
TakeOverWorker
(workerID int, ownerCPInstanceID, orgID string, expectedOwnerEpoch int64)
controlplane/worker_pool.go:136
↓ 5 callers
Function
TraceIDFromContext
TraceIDFromContext returns the hex trace ID from the span context, or "".
server/observe/tracing.go:246
↓ 5 callers
Function
TuneAcceptedConn
TuneAcceptedConn applies keepalive + user-timeout settings to a freshly accepted connection. Non-TCP connections and best-effort syscall failures are
internal/netkeepalive/keepalive.go:46
↓ 5 callers
Method
Valid
Valid reports whether got matches any accepted token. Every candidate digest is compared with subtle.ConstantTimeCompare and there is no early exit on
controlplane/admin/dashboard.go:57
↓ 5 callers
Method
ValidateCredentialsForSNI
(sni, username, password string)
server/flightsqlingress/ingress.go:143
↓ 5 callers
Function
ValidateUserPassword
ValidateUserPassword validates username/password without leaking user existence via credential-compare timing differences.
server/auth/policy.go:55
↓ 5 callers
Method
beginQueryMetrics
(start time.Time)
server/query_metrics.go:30
↓ 5 callers
Function
bindMessageBody
bindMessageBody builds a Bind message body (without the type byte and length prefix) for portal/statement names with raw trailing fields.
server/conn_bind_test.go:29
↓ 5 callers
Function
boolPtr
(v bool)
server/server.go:1421
↓ 5 callers
Function
buildCredentialChainSecret
buildCredentialChainSecret builds a CREATE SECRET statement using AWS SDK credential chain
server/server.go:2149
↓ 5 callers
Method
calls
(t *testing.T)
tests/e2e-mw-dev/run_sh_test.go:265
↓ 5 callers
Function
captureSlog
captureSlog redirects slog.Default to a buffer for the duration of a test and returns the buffer + a restore function. Used by the forward-uncached lo
cmd/cache-proxy/proxy_test.go:80
↓ 5 callers
Function
cloneNode
cloneNode deep-copies an AST node so an operand can appear at several positions in the emitted expression without sharing mutable state.
transpiler/transform/operators.go:857
↓ 5 callers
Function
cloneWorkerAssignment
(assignment *WorkerAssignment)
controlplane/worker_state.go:228
↓ 5 callers
Method
closeCursorsAtTxEnd
closeCursorsAtTxEnd closes all open cursors before a COMMIT/ROLLBACK statement executes. PostgreSQL destroys non-holdable cursors at transaction end;
server/conn_cursor.go:114
↓ 5 callers
Function
clusterTestRouter
clusterTestRouter mounts the cluster-topology endpoints on a fresh gin engine backed by a fake clientset seeded with objs.
controlplane/admin/cluster_test.go:25
↓ 5 callers
Function
connect
()
scripts/client-compat/clients/tokio-postgres/src/main.rs:85
↓ 5 callers
Function
connect
(ctx context.Context)
scripts/client-compat/clients/pgx/main.go:89
↓ 5 callers
Method
count
count returns how many events with the given name were captured.
controlplane/provisioner/controller_analytics_test.go:64
↓ 5 callers
Function
cpconfigStoreNew
(connStr string)
tests/configstore/helpers_test.go:67
↓ 5 callers
Method
currentActivation
()
duckdbservice/activation.go:28
↓ 5 callers
Method
currentStopContext
()
server/querylog_kafka.go:272
↓ 5 callers
Method
currentTime
()
server/querylog_kafka_writer.go:480
↓ 5 callers
Method
deparseNode
deparseNode deparses a single node with CTE references rewritten to temp table names. For expression nodes (like WHERE clauses), it wraps them in a SE
transpiler/transform/writablecte.go:649
↓ 5 callers
Function
describeMsgs
(msgs []wireMsg)
server/query_source_test.go:218
↓ 5 callers
Method
doCreateSession
Custom action handlers (called via customActionServer.DoAction)
duckdbservice/flight_handler.go:211
↓ 5 callers
Method
doHandover
doHandover sends SIGUSR1 and waits for the new CP to take over.
tests/controlplane/controlplane_test.go:297
↓ 5 callers
Method
done
(self)
scripts/client-compat/report_client.py:47
↓ 5 callers
Method
drainWholeUnits
drainWholeUnits converts the accumulated milli-units into whole vCPU-/GiB- second deltas to flush, carrying the sub-unit remainder forward so it is no
controlplane/compute_meter.go:116
↓ 5 callers
Function
ducklingMetadataStoreAddress
(status *provisioner.DucklingStatus, orgID string)
controlplane/shared_worker_activator.go:470
↓ 5 callers
Function
env
(key, fallback string)
scripts/client-compat/clients/pgx/main.go:82
↓ 5 callers
Method
env
(String key, String fallback)
scripts/client-compat/clients/jdbc/src/main/java/com/posthog/compat/JdbcCompatTest.java:65
↓ 5 callers
Function
envOrDefault
(key, def string)
cmd/cache-proxy/main.go:190
↓ 5 callers
Function
env_or
(key: &str, fallback: &str)
scripts/client-compat/clients/tokio-postgres/src/main.rs:19
↓ 5 callers
Method
execLocked
(ctx context.Context, query string, args ...any)
server/flightsqlingress/ingress.go:1255
↓ 5 callers
Method
extractOrgFromSNI
extractOrgFromSNI is a no-op stub in non-kubernetes builds. The multi-tenant control-plane code paths that consume this method are gated at runtime on
controlplane/sni_other.go:10
↓ 5 callers
Function
extractStringConstant
extractStringConstant extracts the string value from an AST node if it's a string constant.
transpiler/transform/functions.go:512
↓ 5 callers
Method
fail
(self, name, reason)
scripts/client-compat/clients/dbt/test_dbt.py:46
↓ 5 callers
Method
findIdleWorkerLocked
findIdleWorkerLocked returns a live worker with no active sessions, or nil. Caller must hold p.mu (read or write lock).
controlplane/worker_mgr.go:865
↓ 5 callers
Method
finishQueryMetrics
(scope *queryMetricsScope)
server/query_metrics.go:41
↓ 5 callers
Function
gaugeValue
(t *testing.T, g prometheus.Gauge)
cmd/cache-proxy/cache_test.go:27
↓ 5 callers
Function
getJSON
(t *testing.T, e *gin.Engine, path string)
controlplane/admin/cluster_test.go:33
↓ 5 callers
Function
installFakeQueryTracker
(t *testing.T)
server/conn_analytics_test.go:26
↓ 5 callers
Function
installFakeTracker
installFakeTracker swaps in a recording tracker for the duration of a test.
controlplane/provisioning/analytics_events_test.go:31
↓ 5 callers
Function
installFakeTracker
installFakeTracker swaps in a recording tracker for the duration of a test.
controlplane/provisioner/controller_analytics_test.go:39
↓ 5 callers
Function
isSystemError
(category: ErrorCategory)
controlplane/admin/ui/src/lib/errors.ts:47
↓ 5 callers
Function
isTransactionControlStmt
isTransactionControlStmt returns true if the query is a transaction control statement (COMMIT, ROLLBACK, or END). These must not be retried on transie
duckdbservice/transient.go:18
← previous
next →
601–700 of 5,901, ranked by callers