MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

↓ 4 callersMethodRecordSuccessfulAuth
RecordSuccessfulAuth clears failed attempts for an IP after successful auth.
server/auth/ratelimit.go:196
↓ 4 callersMethodRecv
()
controlplane/session_mgr_drain_test.go:499
↓ 4 callersFunctionRedactQueryLogWriterError
RedactQueryLogWriterError returns a log-safe error string for the privileged query-log writer. Writer failures can wrap DuckDB/DuckLake errors that ec
server/querylog_kafka_writer.go:421
↓ 4 callersMethodRefreshOwnerEpochAtomic
RefreshOwnerEpochAtomic holds the per-worker epoch lock across the callback so the durable bump and the in-memory update appear atomic to concurrent r
controlplane/worker_mgr.go:127
↓ 4 callersFunctionRegisterCLIInputsFlags
RegisterCLIInputsFlags registers every CLIInputs-backed CLI flag onto fs and returns a harvest closure that — once fs.Parse has run — produces a fully
configresolve/cliflags.go:24
↓ 4 callersMethodReleaseIdleHotWorkers
ReleaseIdleHotWorkers parks idle (zero-session) Hot workers into hot_idle at drain start so the TTL reaper reclaims them instead of letting them linge
controlplane/control.go:261
↓ 4 callersMethodReleaseOrgConnectionLease
(leaseID string)
controlplane/connection_limiter.go:35
↓ 4 callersMethodReleaseWorker
ReleaseWorker decrements the active session count for a worker.
controlplane/worker_pool.go:62
↓ 4 callersMethodReload
Reload forces an immediate config reload from the database.
controlplane/configstore/store.go:1861
↓ 4 callersMethodReloadSnapshot
()
controlplane/admin/live.go:159
↓ 4 callersMethodRequestRebalance
RequestRebalance signals that a rebalance is needed. Multiple rapid calls are coalesced — the actual rebalance runs at most once per debounce interval
controlplane/memory_rebalancer.go:107
↓ 4 callersMethodReservePID
ReservePID generates a new unique PID for a session.
controlplane/session_mgr.go:186
↓ 4 callersFunctionResolveRuntimeContract
(defaultManifestPath string)
tests/perf/datasets/runtime.go:30
↓ 4 callersMethodRetireWorkerIfNoSessions
RetireWorkerIfNoSessions retires a worker only if it has zero active sessions after releasing the caller's claim. Returns true if retired.
controlplane/worker_pool.go:69
↓ 4 callersMethodRun
(ctx context.Context)
tests/perf/core/runner.go:51
↓ 4 callersMethodSpawnWorker
SpawnWorker starts a new duckdb-service worker process. It uses a pre-bound socket from the pool if available, falling back to binding a new socket (w
controlplane/worker_mgr.go:349
↓ 4 callersMethodState
State returns the worker's state at observation time.
controlplane/configstore/lifecycle_types.go:47
↓ 4 callersMethodValidate
Validate checks that the lifecycle and assignment metadata are internally consistent.
controlplane/worker_state.go:96
↓ 4 callersMethodWaitWarehouseReady
(ctx context.Context, orgID string, opts WaitOptions)
tests/scenario/provision/client.go:127
↓ 4 callersFunctionWriteAuthCleartextPassword
writeAuthCleartextPassword requests cleartext password
server/wire/protocol.go:217
↓ 4 callersFunctionWriteAuthOK
writeAuthOK sends authentication success
server/wire/protocol.go:210
↓ 4 callersFunctionWriteEmptyQueryResponse
writeEmptyQueryResponse sends an empty query response
server/wire/protocol.go:306
↓ 4 callersFunctionWriteReadyForQuery
writeReadyForQuery indicates the server is ready for a new query
server/wire/protocol.go:241
↓ 4 callersMethodacquireConnectionSlot
(ctx context.Context, pid int32, username string, protocol string, profile *WorkerProfile)
controlplane/session_mgr.go:195
↓ 4 callersFunctionadvisoryLockKey
(s string)
controlplane/configstore/store.go:1782
↓ 4 callersFunctionapplyDuckLakePreAttachSettingsWith
(db duckLakeSQLExecer, loadPostgresScanner func() error, dlCfg DuckLakeConfig)
server/server.go:1453
↓ 4 callersFunctionauditSummary
(e: AuditEntry)
controlplane/admin/ui/src/lib/audit.ts:75
↓ 4 callersMethodbeginStream
()
server/flightsqlingress/ingress.go:1409
↓ 4 callersFunctionbindFrame
(portalName, stmtName string)
server/conn_skip_until_sync_test.go:91
↓ 4 callersFunctioncacheProxyHealthURL
cacheProxyHealthURL returns the health endpoint URL (empty if disabled).
duckdbservice/cache_proxy.go:40
↓ 4 callersMethodcalls
()
server/server_test.go:88
↓ 4 callersMethodclaimSpecificWorker
(ctx context.Context, workerID int, expectedOwnerEpoch int64, assignment *WorkerAssignment)
controlplane/k8s_pool_acquire.go:562
↓ 4 callersFunctionclassifySnapshotMiss
classifySnapshotMiss returns the default reason label for a snapshot-fenced CAS miss. Without an extra round-trip to read the current row we cannot di
controlplane/worker_lifecycle.go:404
↓ 4 callersFunctioncleanupSessionState
cleanupSessionState drops temporary tables and views on the connection so that session-scoped state doesn't leak when the connection is returned to th
duckdbservice/service.go:1603
↓ 4 callersFunctioncollectSink
collectSink returns a sink that streams the peer body into buf, mirroring how DiskCache.PutStream consumes it in production (without touching disk).
cmd/cache-proxy/peers_test.go:16
↓ 4 callersFunctionconfigureDuckLakeMetadataPool
(db duckLakeSQLExecer)
server/server.go:1489
↓ 4 callersFunctioncopyOrg
(org *configstore.Org)
controlplane/admin/api_test.go:200
↓ 4 callersMethodcount
()
controlplane/janitor_leader_k8s_test.go:40
↓ 4 callersFunctioncounterMetricValue
(t *testing.T, metricName string)
server/auth/policy_test.go:12
↓ 4 callersFunctioncpReplicaSetHash
cpReplicaSetHash extracts the Deployment ReplicaSet hash segment from a CP pod name ("duckgres-control-plane-6f877c7779-abcde" -> "6f877c7779"). A nam
controlplane/k8s_pool_helpers.go:157
↓ 4 callersMethodcreateOrgStack
createOrgStack creates an isolated pool + session manager for an org.
controlplane/org_router.go:99
↓ 4 callersMethodcreateRegexFuncCall
createRegexFuncCall creates a regexp_matches function call node For negated operators, wraps in NOT
transpiler/transform/operators.go:954
↓ 4 callersFunctiondecodeBinaryCopy
decodeBinaryCopy decodes a binary COPY field, using field length to resolve type ambiguity. DuckDB's postgres extension may send different integer wid
server/conn_copy.go:1269
↓ 4 callersFunctiondecodeFloat4
(data []byte)
server/types.go:941
↓ 4 callersFunctiondecodeFloat8
(data []byte)
server/types.go:949
↓ 4 callersFunctiondecodeInterval
decodeInterval decodes PostgreSQL binary INTERVAL (16 bytes) into an interval string.
server/types.go:626
↓ 4 callersFunctiondecodeTime
decodeTime decodes int64 microseconds since midnight into a time string.
server/types.go:593
↓ 4 callersFunctiondecodeTimestamp
(data []byte)
server/types.go:967
↓ 4 callersFunctiondecodeUUID
decodeUUID decodes 16 raw bytes into a UUID string "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx".
server/types.go:556
↓ 4 callersFunctiondel
(path: string)
controlplane/admin/ui/src/lib/api.ts:104
↓ 4 callersMethoddeparseNode
deparseNode converts a node back to SQL string for use as a key
transpiler/transform/expandarray.go:475
↓ 4 callersFunctiondgOnly
dgOnly returns the Duckgres database
tests/integration/setup_test.go:409
↓ 4 callersFunctiondockerComposeArgs
(composeFile string, command string, args ...string)
tests/integration/harness.go:649
↓ 4 callersFunctiondurationFromWith
(step core.Step, key string)
tests/scenario/provision/steps.go:240
↓ 4 callersFunctioneffectiveDefaultWorkerTTL
effectiveDefaultWorkerTTL resolves the janitor's hot-idle retention: the operator default TTL (DUCKGRES_K8S_WORKER_DEFAULT_TTL → K8sConfig.WorkerDefau
controlplane/multitenant.go:38
↓ 4 callersFunctionencodeDate
(v interface{})
server/types.go:463
↓ 4 callersFunctionencodeJSON
encodeJSON re-serializes a Go value to JSON bytes. The Go DuckDB driver deserializes JSON columns into native Go types (json.Unmarshal: string→string
server/types.go:863
↓ 4 callersFunctionencodeText
(v interface{})
server/types.go:854
↓ 4 callersFunctionencodeTimestamp
(v interface{})
server/types.go:488
↓ 4 callersMethodendStream
()
server/flightsqlingress/ingress.go:1413
↓ 4 callersMethodensureConnectionContext
()
server/conn.go:285
↓ 4 callersFunctionequalStrings
(a, b []string)
tests/scenario/core/runner_test.go:309
↓ 4 callersFunctionescapeDuckLakeConnStringValue
(value string)
controlplane/shared_worker_activator.go:644
↓ 4 callersFunctionevery
(ms: number, fn: () => void)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:80
↓ 4 callersMethodexecConn
(ctx context.Context, query string, args ...any)
duckdbservice/service.go:351
↓ 4 callersMethodexecWithRecoveryLocked
(ctx context.Context, query string, args ...any)
server/flightsqlingress/ingress.go:1265
↓ 4 callersFunctionexecuteFrame
(portalName string)
server/conn_skip_until_sync_test.go:111
↓ 4 callersMethodexecuteQueryDirect
executeQueryDirect executes a query directly against DuckDB without any transpilation. Used for passthrough users who send DuckDB-native SQL.
server/conn_query_exec.go:18
↓ 4 callersFunctionfindSpan
findSpan returns the first recorded span with the given name, or fails.
cmd/cache-proxy/tracing_test.go:29
↓ 4 callersFunctionflightAuthContext
(username, password string)
tests/controlplane/flight_ingress_test.go:26
↓ 4 callersMethodflightOrgFromContext
flightOrgFromContext resolves the org for a Flight session from the request context's SNI (the managed hostname). Used by orgRoutedSessionProvider to
controlplane/control.go:2032
↓ 4 callersFunctionfmtBytes
(n: number | null | undefined)
controlplane/admin/ui/src/lib/format.ts:42
↓ 4 callersFunctionfmtCpu
(mc: number)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:102
↓ 4 callersFunctionfmtMem
(b: number)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:103
↓ 4 callersFunctionfreePort
freePort allocates a free TCP port by briefly listening on :0.
tests/controlplane/controlplane_test.go:311
↓ 4 callersMethodgetCR
getCR fetches a Duckling CR by its exact name — the warehouse row's duckling_name. The control plane never derives or re-maps the name.
controlplane/provisioner/k8s_client.go:233
↓ 4 callersMethodgetQuerySchema
(ctx context.Context, query string, tx *sql.Tx)
duckdbservice/service.go:436
↓ 4 callersMethodhandleBind
(body []byte)
server/conn_extended_query.go:921
↓ 4 callersMethodhandleDescribe
(body []byte)
server/conn_extended_query.go:211
↓ 4 callersFunctionhasSeg
hasSeg reports whether segs contains s.
controlplane/admin/audit.go:213
↓ 4 callersFunctioninterpolateArgs
interpolateArgs performs simple positional argument interpolation for Flight SQL. Flight SQL's Execute doesn't support $1-style parameters natively, s
server/flightclient/flight_executor.go:897
↓ 4 callersFunctionisConnectionBroken
isConnectionBroken checks if an error indicates a broken connection (e.g., SSL connection closed, network error).
server/conn_errors.go:292
↓ 4 callersMethodisExpandArrayFunc
isExpandArrayFunc checks if a function call is to _pg_expandarray
transpiler/transform/expandarray.go:461
↓ 4 callersFunctionisFetchForwardOnly
isFetchForwardOnly returns true if the FetchStmt direction is forward-compatible.
server/conn_cursor.go:137
↓ 4 callersMethodisGenericSessionSchedulableWorkerLocked
(w *ManagedWorker)
controlplane/k8s_pool_acquire.go:843
↓ 4 callersFunctionisIdentCont
isIdentCont reports whether b can continue an SQL identifier.
transpiler/longident.go:340
↓ 4 callersFunctionisWorkerConnPoolTimeoutError
isWorkerConnPoolTimeoutError reports whether err is the worker-side "failed to obtain connection from pool" session-create failure (duckdbservice acqu
controlplane/session_mgr.go:472
↓ 4 callersFunctionkeyA
keyA is the billing key most tests share: orgA's default team, standard source, an 8-vCPU/16-GiB worker.
controlplane/compute_meter_test.go:60
↓ 4 callersMethodliveWorkerCountLocked
liveWorkerCountLocked returns the number of workers whose process is still running (done channel not closed) plus workers currently being spawned. Inc
controlplane/worker_mgr.go:901
↓ 4 callersFunctionloadOrCreateAccountKey
(path string)
server/tlscert/acme_dns.go:481
↓ 4 callersFunctionloadScenarioForRun
(path string)
tests/scenario/runner_test.go:497
↓ 4 callersMethodlogDroppedOnStop
(batchLen int)
server/querylog_kafka.go:292
↓ 4 callersFunctionlooksJSON
looksJSON reports whether a node is syntactically JSON: a cast to json/jsonb, a JSON-returning json* function call (including the json_extract calls t
transpiler/transform/operators.go:656
↓ 4 callersMethodmanagedHostnameHint
managedHostnameHint formats the configured ManagedHostnameSuffixes into a "<org-id>.dw.<env>.postwh.com" string suitable for user-facing error message
controlplane/control.go:795
↓ 4 callersFunctionmapDuckDBType
mapDuckDBType maps a DuckDB type name to PostgreSQL type info
server/types.go:148
↓ 4 callersFunctionmatchPgCursorsQuery
matchPgCursorsQuery checks if a query is a pg_cursors lookup and extracts the cursor name. Returns the cursor name and true for literal queries, empty
server/conn_cursor.go:159
↓ 4 callersFunctionmatchPgStatActivityQuery
matchPgStatActivityQuery returns true if a query references pg_stat_activity.
server/conn_pg_stat_activity.go:30
↓ 4 callersFunctionmergePeer
mergePeer is a small generic helper: it unmarshals each peer body into E and appends extract(E) to acc. Bodies that fail to parse are skipped (the pee
controlplane/admin/live_aggregate.go:111
↓ 4 callersFunctionmetadataDiff
(migrated, gorm map[string]T)
tests/configstore/migrations_postgres_test.go:794
↓ 4 callersFunctionmetricCounterValue
(t *testing.T, metricName string)
server/flightsqlingress/ingress_test.go:323
← previousnext →801–900 of 5,901, ranked by callers