MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

↓ 10 callersFunctionaddShutdownWorker
(t *testing.T, p *K8sWorkerPool, cs *fake.Clientset, id int)
controlplane/k8s_pool_test.go:4209
↓ 10 callersFunctionappendValue
appendValue is a test-only reimplementation of the subset of duckdbservice.AppendValue logic needed for MAP round-trip tests. It lives here because se
server/flightclient/flight_executor_arrow_test.go:1806
↓ 10 callersFunctioncreateMismatchWorkerPod
(t *testing.T, cs *fake.Clientset, name, controlPlaneLabel, workerIDLabel string)
controlplane/k8s_pool_test.go:3548
↓ 10 callersFunctioncursorUsers
cursorUsers returns the users fixture rows (fixtures/data.sql) with firstID <= id <= lastID, ordered by id.
tests/integration/cursor_test.go:38
↓ 10 callersFunctionesc
(s: any)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:301
↓ 10 callersMethodexecuteCleanup
executeCleanup runs cleanup statements, ignoring errors (best effort). This is used to clean up temp tables after a multi-statement query.
server/conn_query_exec.go:893
↓ 10 callersFunctionfixedClock
(ts time.Time)
tests/scenario/core/runner_test.go:305
↓ 10 callersMethodgetConnection
()
scripts/client-compat/clients/jdbc/src/main/java/com/posthog/compat/JdbcCompatTest.java:70
↓ 10 callersFunctionisDuckLakeTransactionConflict
isDuckLakeTransactionConflict returns true if the error is a DuckLake transaction conflict. These occur when concurrent DuckLake transactions try to c
server/conn_errors.go:43
↓ 10 callersFunctionisWSChar
isWSChar reports whether c is an ASCII whitespace character.
server/conn.go:1772
↓ 10 callersMethodlistConns
listConns returns a snapshot of all registered client connections.
server/server.go:759
↓ 10 callersFunctionmetricCounterFamilyTotal
metricCounterFamilyTotal sums the value across all series of a counter family. Returns 0 if the family has no series yet. Useful for "did anything inc
controlplane/metrics_test_helpers_test.go:101
↓ 10 callersFunctionnewFlightAuthSessionStore
(provider SessionProvider, idleTTL, reapInterval, handleIdleTTL, tokenTTL, workerQueueTimeout time.Duration, o
server/flightsqlingress/ingress.go:1484
↓ 10 callersFunctionnewTestCache
newTestCache creates a DiskCache backed by t.TempDir() for isolation.
cmd/cache-proxy/cache_test.go:96
↓ 10 callersFunctionnewUserSecretTestConn
(t *testing.T, mgr UserSecretManager, exec *lifecycleExecutor)
server/conn_user_secrets_test.go:34
↓ 10 callersFunctionobserveLifecycleTransitionDuration
observeLifecycleTransitionDuration records elapsed time for a WorkerLifecycle.* invocation against the duration histogram. Negative durations (clock s
controlplane/worker_lifecycle_metrics.go:272
↓ 10 callersFunctionobserveSpawnFailure
observeSpawnFailure increments the spawn-failure counter for the given (reason, image) tuple. Empty reason drops the sample (the counter would be usel
controlplane/worker_lifecycle_metrics.go:309
↓ 10 callersFunctionqueryPgStatActivity
queryPgStatActivity returns all rows from pg_stat_activity as maps.
tests/integration/pg_stat_activity_test.go:70
↓ 10 callersFunctionquoteIdentifier
quoteIdentifier quotes an identifier for safe use in SQL
transpiler/transform/writablecte.go:959
↓ 10 callersMethodreapIdle
reapIdle rolls back idle transactions and releases drain tokens stranded by a GetFlightInfo whose matching DoGet never arrived. Both are bounded so a
duckdbservice/service.go:629
↓ 10 callersFunctionrecordQueryLogKafkaWriterEvent
(outcome, reason string)
server/querylog_kafka_writer.go:108
↓ 10 callersFunctionrecoverAbortedTransaction
( err error, canRollback bool, rollback func() error, retry func() (T, error), )
server/transient.go:104
↓ 10 callersFunctionretryOnConflict
retryOnConflict retries fn on DuckLake transaction conflicts with exponential backoff and jitter (50-100% of backoff interval). Only used for autocomm
server/transient.go:123
↓ 10 callersFunctionrunDDL
(t *testing.T, policy backend.DDLPolicy, sql string)
transpiler/transform/ddl_test.go:16
↓ 10 callersMethodsessionFromContext
sessionFromContext extracts the session from gRPC metadata. The session token is expected in the "x-duckgres-session" header.
duckdbservice/flight_handler.go:160
↓ 10 callersFunctionsetAuditDetail
setAuditDetail records a human-readable detail string for the current request so AuditMiddleware includes it in the audit row. No-op for the empty str
controlplane/admin/audit.go:150
↓ 10 callersMethodsnapshot
()
controlplane/k8s_pool_test.go:193
↓ 10 callersMethodsnapshot
()
controlplane/worker_lifecycle_test.go:135
↓ 10 callersFunctiontrackSQLTransactionState
(query string, execErr error, sqlTxActive *atomic.Bool)
duckdbservice/transient.go:35
↓ 10 callersFunctionupsertMarkLostWorker
(t *testing.T, store *configstore.ConfigStore, workerID int, state configstore.WorkerState, ownerCPInstanceID
tests/configstore/runtime_store_postgres_test.go:2516
↓ 10 callersMethodwalkAndTransform
(node *pg_query.Node, changed *bool)
transpiler/transform/pgcatalog.go:341
↓ 10 callersMethodwalkAndTransform
(node *pg_query.Node, changed *bool)
transpiler/transform/information_schema.go:58
↓ 10 callersMethodworkerRPCSecretName
(podName string)
controlplane/worker_rpc_security.go:106
↓ 9 callersMethodActiveDrainWork
()
duckdbservice/service.go:1365
↓ 9 callersMethodClaimHotIdleWorker
(ownerCPInstanceID, orgID, image string, profileCPU, profileMemory string, maxOrgWorkers int)
controlplane/worker_pool.go:131
↓ 9 callersMethodDestroyAllSessions
DestroyAllSessions destroys every active session without holding the manager lock while running per-session cleanup.
controlplane/session_mgr.go:731
↓ 9 callersMethodDestroySession
(int32)
server/flightsqlingress/ingress.go:80
↓ 9 callersMethodErrorClass
()
tests/scenario/core/runner.go:28
↓ 9 callersMethodExecContext
(context.Context, string, ...any)
tests/perf/publisher/publisher.go:71
↓ 9 callersMethodGetByTokenContext
(ctx context.Context, token string)
server/flightsqlingress/ingress.go:1639
↓ 9 callersMethodGetFlightSessionRecord
(sessionToken string)
controlplane/control.go:247
↓ 9 callersFunctionIdentityFromContext
IdentityFromContext returns the resolved Identity, or nil if unauthenticated.
controlplane/admin/authz.go:63
↓ 9 callersMethodMemoryLimit
MemoryLimit returns the memory limit string applied to every session.
controlplane/memory_rebalancer.go:191
↓ 9 callersFunctionNewLiteralTransform
()
transpiler/transform/literals.go:23
↓ 9 callersMethodOnWorkerCrash
OnWorkerCrash handles a worker crash by marking all affected executors as dead and notifying sessions. Executors are marked dead BEFORE the shared gRP
controlplane/session_mgr.go:848
↓ 9 callersMethodPreBindSockets
PreBindSockets eagerly binds count Unix sockets at startup while the socket directory is verified writable. Under systemd's ProtectSystem=strict, the
controlplane/worker_mgr.go:218
↓ 9 callersMethodPutStream
PutStream stores data from r under key without buffering the whole body in memory. It writes to a temp file and atomically renames it into place, so a
cmd/cache-proxy/cache.go:229
↓ 9 callersMethodResolveQueryLogEntryWriter
(ctx context.Context, orgID string)
server/querylog_kafka_writer.go:854
↓ 9 callersMethodRetireOneMismatchedVersionWorker
RetireOneMismatchedVersionWorker scans all shared worker pods in the namespace for one whose duckgres/control-plane label identifies a different Deplo
controlplane/k8s_pool_reconcile.go:36
↓ 9 callersMethodSetMaxConnections
SetMaxConnections sets the maximum connections for this SessionManager.
controlplane/session_mgr.go:147
↓ 9 callersMethodString
String renders the decimal in plain numeric form, e.g. {314159, 5} → "3.14159" and {-5, 2} → "-0.05". Required so the PG text-protocol formatter (serv
duckdbservice/arrowmap/arrowmap.go:343
↓ 9 callersMethodTableName
()
controlplane/configstore/models.go:390
↓ 9 callersMethodTryAcquireOrgConnectionLeaseWithLimitLookup
(requestID string, limits func(string) configstore.OrgResourceLimits, now time.Time)
controlplane/connection_limiter.go:40
↓ 9 callersFunctionWalkFunc
WalkFunc walks all nodes in a ParseResult and calls fn for each. If fn returns false, walking stops.
transpiler/transform/transform.go:67
↓ 9 callersFunctionWriteErrorResponse
writeErrorResponse sends an error to the client
server/wire/protocol.go:246
↓ 9 callersFunctionassertWorkerStateAndReason
(t *testing.T, store *configstore.ConfigStore, workerID int, wantState configstore.WorkerState, wantReason str
tests/configstore/runtime_store_postgres_test.go:2532
↓ 9 callersFunctionauthContextForPeer
(addr net.Addr, username, password string)
server/flightsqlingress/ingress_test.go:410
↓ 9 callersFunctionbootstrapBundledExtensions
(dataDir string)
server/server.go:82
↓ 9 callersMethodbuildCommandTag
(cmdType string, result ExecResult)
server/conn.go:2178
↓ 9 callersFunctionclassified
(class string, err error)
tests/scenario/sql/errors.go:35
↓ 9 callersMethodcleanDeadWorkersLocked
cleanDeadWorkersLocked removes all dead worker entries from the map and schedules resource cleanup (client, parent listener, socket file) in the backg
controlplane/worker_mgr.go:917
↓ 9 callersMethodcleanupOrphanedWorkerPods
cleanupOrphanedWorkerPods deletes worker pods whose DB row is in a terminal state (retired/lost) or has no DB row at all, reconciling K8s against the
controlplane/k8s_pool_reconcile.go:190
↓ 9 callersMethodcloseCursor
closeCursor closes a specific cursor and cleans up its resources.
server/conn_cursor.go:85
↓ 9 callersFunctioncopyWarehouse
(warehouse *configstore.ManagedWarehouse)
controlplane/admin/api_test.go:192
↓ 9 callersFunctionemulateGenerateName
emulateGenerateName makes the fake clientset assign unique names from metav1.GenerateName on pod create, as the real API server does (the fake otherwi
controlplane/headroom_test.go:23
↓ 9 callersFunctionfetchCursorRows
fetchCursorRows runs a FETCH/MOVE statement on the transaction's connection (lib/pq sends it via the simple query protocol) and collects any rows it r
tests/integration/cursor_test.go:67
↓ 9 callersFunctionfmtCompact
(n: number | null | undefined)
controlplane/admin/ui/src/lib/format.ts:54
↓ 9 callersFunctionfs
(state: string, count: number)
controlplane/admin/ui/src/lib/fleet.test.ts:12
↓ 9 callersFunctionisIdleSession
(state: string | undefined)
controlplane/admin/ui/src/lib/session.ts:10
↓ 9 callersFunctionmakeTestWorker
--- Helpers ---
controlplane/pool_metrics_test.go:278
↓ 9 callersFunctionnewHeadroomPool
(cs *fake.Clientset, store RuntimeWorkerStore)
controlplane/headroom_test.go:88
↓ 9 callersFunctionopenBaseDB
openBaseDB creates and configures a DuckDB connection with threads, memory limit, temp directory, extensions, and cache_httpfs settings. This shared s
server/server.go:839
↓ 9 callersFunctionorgStr
orgStr renders an org config string value for audit detail, showing "" as a readable "(unset)" so a cleared field is unambiguous.
controlplane/admin/api.go:694
↓ 9 callersFunctionparseDucklingStatus
(cr *unstructured.Unstructured)
controlplane/provisioner/k8s_client.go:443
↓ 9 callersMethodpersistWorkerRecord
persistWorkerRecord upserts the record and returns the underlying error (including ErrWorkerRecordUpsertFenceMiss when the CP no longer owns the lease
controlplane/k8s_pool_helpers.go:43
↓ 9 callersMethodpodNameForWorker
podNameForWorker returns the pod name for a given worker ID, including the org ID if set (multi-tenant mode).
controlplane/k8s_pool_helpers.go:123
↓ 9 callersFunctionreadStartupFromRaw
readStartupFromRaw reads the startup message from a raw (unbuffered) connection. It handles GSSENCRequest negotiation (up to maxNegotiationRounds) bef
controlplane/control.go:1553
↓ 9 callersFunctionrestoreLongIdentifiers
restoreLongIdentifiers reverses protectLongIdentifiers, substituting each placeholder in sql back to its original token text. It is a no-op when repls
transpiler/longident.go:189
↓ 9 callersMethodretireWorkerWithReason
retireWorkerWithReason retires a worker and deletes its pod. Returns true if the worker was found and retired. origin labels the originating subsystem
controlplane/k8s_pool_lifecycle.go:29
↓ 9 callersFunctionseedOrgWithWarehouse
(store *fakeAPIStore, name string)
controlplane/admin/api_test.go:222
↓ 9 callersFunctionshortTempDir
shortTempDir creates a short temp directory suitable for Unix socket paths (which are limited to 104 bytes on macOS). t.TempDir() paths are too long.
controlplane/worker_mgr_process_test.go:776
↓ 9 callersFunctionstringFromWith
(step core.Step, key, fallback string)
tests/scenario/sql/steps.go:393
↓ 9 callersMethodtouch
()
server/flightsqlingress/ingress.go:1204
↓ 9 callersMethodvalidateControlMetadata
(meta server.WorkerControlMetadata)
duckdbservice/activation.go:318
↓ 9 callersMethodvisitPredicateField
(field **pg_query.Node, preserveNull bool)
transpiler/transform/boolpredicates.go:197
↓ 9 callersMethodwaitForLog
(substr string, timeout time.Duration)
tests/controlplane/controlplane_test.go:237
↓ 8 callersMethodAcquireWorker
AcquireWorker returns a worker for a new session. Strategy: 1. Reuse an idle worker (0 active sessions) if available. 2. If the pool has fewer live w
controlplane/worker_mgr.go:686
↓ 8 callersMethodActivateReservedWorker
ActivateReservedWorker transitions a reserved worker through activating to hot. Failed activations retire the worker immediately.
controlplane/k8s_pool_acquire.go:140
↓ 8 callersMethodAllStacks
AllStacks returns a snapshot of all org stacks for admin API usage.
controlplane/org_router.go:338
↓ 8 callersFunctionAuthMiddleware
AuthMiddleware authenticates a request and resolves its Role. A valid TokenSet bearer token (header/cookie) is the service-to-service / break-glass pa
controlplane/admin/authz.go:77
↓ 8 callersMethodClose
()
tests/perf/drivers/flight/driver.go:20
↓ 8 callersMethodClose
()
server/querylog_kafka_writer.go:70
↓ 8 callersMethodCreateSessionWithProtocol
(ctx context.Context, username string, pid int32, memoryLimit string, threads int, protocol string, profile *W
controlplane/session_mgr.go:334
↓ 8 callersMethodDestroySession
DestroySession destroys a session, retires its dedicated worker, and rebalances memory/thread limits across remaining sessions.
controlplane/session_mgr.go:652
↓ 8 callersFunctionDuckDBTypeToArrow
DuckDBTypeToArrow maps a DuckDB type name to an Arrow DataType.
duckdbservice/arrowmap/arrowmap.go:30
↓ 8 callersMethodExecuteStep
(ctx context.Context, step core.Step)
tests/scenario/sql/steps.go:125
↓ 8 callersMethodLog
(QueryLogEntry)
server/querylog.go:74
↓ 8 callersFunctionNewExecutor
(cfg ExecutorConfig)
tests/scenario/sql/steps.go:76
↓ 8 callersFunctionNewWorkerSnapshot
NewWorkerSnapshot wraps a WorkerRecord into a WorkerSnapshot. The preferred way to obtain a snapshot is still through ObserveWorker or the snapshot-re
controlplane/configstore/lifecycle_constructors.go:29
↓ 8 callersMethodPingContext
(ctx context.Context)
server/sqlcore/interfaces.go:53
← previousnext →301–400 of 5,901, ranked by callers