MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

↓ 6 callersFunctionsqlstateClass
(sqlstate: string | undefined)
controlplane/admin/ui/src/lib/errors.ts:54
↓ 6 callersFunctionstoreDB
(t *testing.T, store *cpconfigstore.ConfigStore)
tests/configstore/migrations_postgres_test.go:489
↓ 6 callersFunctionstrConstNode
(s string)
transpiler/transform/functions_compat.go:260
↓ 6 callersFunctionstripLeadingComments
(query string)
server/conn.go:1533
↓ 6 callersFunctionsummarizeAttachStmt
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 callersFunctiontestFlightHandlerWithStoreAndRateLimiter
(t *testing.T, users map[string]string, rateLimiter *server.RateLimiter)
server/flightsqlingress/ingress_test.go:416
↓ 6 callersMethodtick
(ctx context.Context)
controlplane/credential_refresh_scheduler.go:71
↓ 6 callersFunctiontoString
(v any)
server/flightsqlingress/ingress.go:2267
↓ 6 callersMethodtransformSelectStmt
(stmt *pg_query.SelectStmt)
transpiler/transform/operators.go:81
↓ 6 callersFunctionvalidateWorkerAssignment
(assignment *WorkerAssignment)
controlplane/worker_state.go:218
↓ 6 callersMethodwithSession
withSession adds the session token to the gRPC context.
server/flightclient/flight_executor.go:135
↓ 6 callersFunctionworkerDrainingStatus
(err error)
duckdbservice/flight_handler.go:33
↓ 6 callersFunctionworkerImageForOrg
(tc *configstore.OrgConfig, fallback string)
controlplane/org_router.go:330
↓ 6 callersMethodworkerLeaseSnapshot
(w *ManagedWorker)
controlplane/k8s_pool_lifecycle.go:1004
↓ 5 callersFunctionAutoMemoryLimit
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 callersMethodClose
Close shuts down the test harness
tests/integration/harness.go:607
↓ 5 callersMethodClose
Close gracefully shuts down the HTTP challenge listener. Safe to call multiple times.
server/tlscert/acme.go:89
↓ 5 callersMethodCloseSession
(sessionToken string, closedAt time.Time)
server/flightsqlingress/ingress.go:116
↓ 5 callersMethodDatabaseNameForSNIPrefix
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 callersMethodDatabaseTypeName
()
server/sqlcore/interfaces.go:20
↓ 5 callersMethodDrain
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 callersFunctionEnrichSpanWithProfiling
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 callersFunctionEnv
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 callersMethodExecuteStep
(context.Context, Step)
tests/scenario/core/runner.go:23
↓ 5 callersMethodExecuteStep
(ctx context.Context, step core.Step)
tests/scenario/perf/steps.go:127
↓ 5 callersMethodFetchFromPeers
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 callersFunctionForName
(name Name)
transpiler/backend/profile.go:85
↓ 5 callersMethodGetControlPlaneInstance
GetControlPlaneInstance returns a runtime control-plane instance row by id.
controlplane/configstore/store.go:916
↓ 5 callersFunctionInitMacros
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 callersMethodIsMigrating
IsMigrating returns true if the org has a DuckLake migration in progress.
controlplane/org_router.go:227
↓ 5 callersFunctionLegacySecretDirectory
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 callersMethodListWorkersDueForCredentialRefresh
(ownerCPInstanceID string, cutoff time.Time)
controlplane/credential_refresh_scheduler.go:23
↓ 5 callersMethodMarkCredentialsRefreshed
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64, expiresAt time.Time)
controlplane/shared_worker_activator.go:62
↓ 5 callersMethodMarkWorkerLostIfCurrentLease
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64, reason string)
controlplane/worker_lifecycle.go:38
↓ 5 callersFunctionNewACMEManager
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 callersFunctionNewCipher
NewCipher builds a Cipher from a base64-encoded (std or url, padded or raw) 32-byte key.
server/usersecrets/crypto.go:30
↓ 5 callersFunctionNewExecutor
(cfg ExecutorConfig)
tests/scenario/perf/steps.go:77
↓ 5 callersFunctionNewFlightExecutorFromClient
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 callersFunctionNewWorkerCapacityExhaustedError
(retryAfter time.Duration)
controlplane/worker_pool.go:35
↓ 5 callersFunctionNewWorkerCapacityExhaustedErrorForReason
(reason configstore.WorkerClaimMissReason, retryAfter time.Duration)
controlplane/worker_pool.go:39
↓ 5 callersFunctionObserveConnectionDuration
ObserveConnectionDuration records one completed connection's lifetime.
server/observe/metrics.go:37
↓ 5 callersMethodPut
Put stores data in the cache, evicting old entries if needed.
cmd/cache-proxy/cache.go:193
↓ 5 callersMethodReconnectFlightSession
(ctx context.Context, username string, workerID int, ownerEpoch int64)
controlplane/session_mgr.go:489
↓ 5 callersFunctionRedactErrorForLog
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 callersFunctionRegisterLogin
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 callersMethodResult
(stepID string)
tests/scenario/sql/steps.go:118
↓ 5 callersMethodRetireDrained
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 callersFunctionRowsToRecord
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 callersMethodSetRequestedVCPUsResolver
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 callersMethodShutdownAll
()
controlplane/control.go:257
↓ 5 callersMethodSignalAll
SignalAll sends a signal to all child processes
server/parent.go:87
↓ 5 callersMethodStackForOrg
(orgID string)
controlplane/control.go:255
↓ 5 callersMethodState
()
tests/scenario/sql/steps.go:108
↓ 5 callersMethodTakeOverWorker
(workerID int, ownerCPInstanceID, orgID string, expectedOwnerEpoch int64)
controlplane/worker_pool.go:136
↓ 5 callersFunctionTraceIDFromContext
TraceIDFromContext returns the hex trace ID from the span context, or "".
server/observe/tracing.go:246
↓ 5 callersFunctionTuneAcceptedConn
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 callersMethodValid
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 callersMethodValidateCredentialsForSNI
(sni, username, password string)
server/flightsqlingress/ingress.go:143
↓ 5 callersFunctionValidateUserPassword
ValidateUserPassword validates username/password without leaking user existence via credential-compare timing differences.
server/auth/policy.go:55
↓ 5 callersMethodbeginQueryMetrics
(start time.Time)
server/query_metrics.go:30
↓ 5 callersFunctionbindMessageBody
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 callersFunctionboolPtr
(v bool)
server/server.go:1421
↓ 5 callersFunctionbuildCredentialChainSecret
buildCredentialChainSecret builds a CREATE SECRET statement using AWS SDK credential chain
server/server.go:2149
↓ 5 callersMethodcalls
(t *testing.T)
tests/e2e-mw-dev/run_sh_test.go:265
↓ 5 callersFunctioncaptureSlog
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 callersFunctioncloneNode
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 callersFunctioncloneWorkerAssignment
(assignment *WorkerAssignment)
controlplane/worker_state.go:228
↓ 5 callersMethodcloseCursorsAtTxEnd
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 callersFunctionclusterTestRouter
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 callersFunctionconnect
()
scripts/client-compat/clients/tokio-postgres/src/main.rs:85
↓ 5 callersFunctionconnect
(ctx context.Context)
scripts/client-compat/clients/pgx/main.go:89
↓ 5 callersMethodcount
count returns how many events with the given name were captured.
controlplane/provisioner/controller_analytics_test.go:64
↓ 5 callersFunctioncpconfigStoreNew
(connStr string)
tests/configstore/helpers_test.go:67
↓ 5 callersMethodcurrentActivation
()
duckdbservice/activation.go:28
↓ 5 callersMethodcurrentStopContext
()
server/querylog_kafka.go:272
↓ 5 callersMethodcurrentTime
()
server/querylog_kafka_writer.go:480
↓ 5 callersMethoddeparseNode
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 callersFunctiondescribeMsgs
(msgs []wireMsg)
server/query_source_test.go:218
↓ 5 callersMethoddoCreateSession
Custom action handlers (called via customActionServer.DoAction)
duckdbservice/flight_handler.go:211
↓ 5 callersMethoddoHandover
doHandover sends SIGUSR1 and waits for the new CP to take over.
tests/controlplane/controlplane_test.go:297
↓ 5 callersMethoddone
(self)
scripts/client-compat/report_client.py:47
↓ 5 callersMethoddrainWholeUnits
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 callersFunctionducklingMetadataStoreAddress
(status *provisioner.DucklingStatus, orgID string)
controlplane/shared_worker_activator.go:470
↓ 5 callersFunctionenv
(key, fallback string)
scripts/client-compat/clients/pgx/main.go:82
↓ 5 callersMethodenv
(String key, String fallback)
scripts/client-compat/clients/jdbc/src/main/java/com/posthog/compat/JdbcCompatTest.java:65
↓ 5 callersFunctionenvOrDefault
(key, def string)
cmd/cache-proxy/main.go:190
↓ 5 callersFunctionenv_or
(key: &str, fallback: &str)
scripts/client-compat/clients/tokio-postgres/src/main.rs:19
↓ 5 callersMethodexecLocked
(ctx context.Context, query string, args ...any)
server/flightsqlingress/ingress.go:1255
↓ 5 callersMethodextractOrgFromSNI
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 callersFunctionextractStringConstant
extractStringConstant extracts the string value from an AST node if it's a string constant.
transpiler/transform/functions.go:512
↓ 5 callersMethodfail
(self, name, reason)
scripts/client-compat/clients/dbt/test_dbt.py:46
↓ 5 callersMethodfindIdleWorkerLocked
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 callersMethodfinishQueryMetrics
(scope *queryMetricsScope)
server/query_metrics.go:41
↓ 5 callersFunctiongaugeValue
(t *testing.T, g prometheus.Gauge)
cmd/cache-proxy/cache_test.go:27
↓ 5 callersFunctiongetJSON
(t *testing.T, e *gin.Engine, path string)
controlplane/admin/cluster_test.go:33
↓ 5 callersFunctioninstallFakeQueryTracker
(t *testing.T)
server/conn_analytics_test.go:26
↓ 5 callersFunctioninstallFakeTracker
installFakeTracker swaps in a recording tracker for the duration of a test.
controlplane/provisioning/analytics_events_test.go:31
↓ 5 callersFunctioninstallFakeTracker
installFakeTracker swaps in a recording tracker for the duration of a test.
controlplane/provisioner/controller_analytics_test.go:39
↓ 5 callersFunctionisSystemError
(category: ErrorCategory)
controlplane/admin/ui/src/lib/errors.ts:47
↓ 5 callersFunctionisTransactionControlStmt
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
← previousnext →601–700 of 5,901, ranked by callers