MCPcopy Create free account

hub / github.com/PostHog/duckgres / functions

Functions5,901 in github.com/PostHog/duckgres

↓ 2 callersFunctionbuildDuckLakeMetadataStoreDSN
(host string, port int, username, password, database string)
controlplane/shared_worker_activator.go:622
↓ 2 callersFunctionbuildDuckLakePreAttachStatements
(dlCfg DuckLakeConfig)
server/server.go:1430
↓ 2 callersFunctionbuildSessionMetadataSQL
buildSessionMetadataSQL returns a single SQL script containing all the per-session catalog/metadata setup statements concatenated with semicolons. The
server/sessionmeta/sessionmeta.go:132
↓ 2 callersFunctionbuildStartupMessage
buildStartupMessage encodes a v3 startup packet: int32 length (includes itself), int32 protocol version, then null-terminated key/value pairs.
server/wire/protocol_test.go:12
↓ 2 callersFunctioncacheProxyS3Addr
cacheProxyS3Addr returns the S3 endpoint to use for DuckDB (empty if disabled).
duckdbservice/cache_proxy.go:52
↓ 2 callersMethodcachedCreds
cachedCreds returns a copy of the cached credentials for roleARN if they are still valid past the safety margin.
controlplane/sts_broker.go:231
↓ 2 callersFunctioncaptureProvisionFailed
captureProvisionFailed emits warehouse_provision_failed with a stable reason category, but only when the terminal Failed transition actually landed (u
controlplane/provisioner/controller.go:31
↓ 2 callersFunctioncaptureSlog
(t *testing.T)
controlplane/k8s_pool_test.go:87
↓ 2 callersFunctioncard
(label: string)
controlplane/admin/ui/src/pages/Overview.test.tsx:41
↓ 2 callersFunctioncastToJSON
castToJSON builds `CAST(<operand> AS json)`.
transpiler/transform/operators.go:845
↓ 2 callersFunctioncheckAndBackupIfNeeded
checkAndBackupIfNeeded connects to the metadata PostgreSQL store, checks the DuckLake spec version, and if migration is required, dumps all ducklake_*
server/ducklake/migration.go:255
↓ 2 callersFunctionclassify
(pod: any)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:132
↓ 2 callersFunctionclassifyQuery
classifyQuery maps a command type string to a query_kind value.
server/querylog.go:539
↓ 2 callersFunctionclassifyStepError
(err error)
tests/scenario/core/runner.go:242
↓ 2 callersMethodcleanup
cleanup removes expired records to prevent memory growth.
server/auth/ratelimit.go:253
↓ 2 callersFunctioncloneSharedWorkerState
(state SharedWorkerState)
controlplane/worker_state.go:245
↓ 2 callersFunctioncloseDelete
()
controlplane/admin/ui/src/pages/OrgDetail.tsx:140
↓ 2 callersFunctioncloseDeprovision
()
controlplane/admin/ui/src/pages/OrgDetail.tsx:421
↓ 2 callersFunctioncloseDrivers
(drivers map[perfcore.Protocol]perfcore.ProtocolDriver)
tests/scenario/perf/steps.go:315
↓ 2 callersMethodcloseDurableSessionIfReconnectTargetUnchanged
(token string, stale DurableSessionRecord, closedAt time.Time)
server/flightsqlingress/ingress.go:1990
↓ 2 callersFunctioncnpgShardFromEndpoint
cnpgShardFromEndpoint extracts the shard name from a cnpg metadata-store endpoint: the first DNS label minus the CloudNativePG service-role suffix, e.
controlplane/admin/ducklings_metadata.go:77
↓ 2 callersMethodcollectExpandArrayCalls
collectExpandArrayCalls finds all _pg_expandarray calls and assigns lateral aliases
transpiler/transform/expandarray.go:164
↓ 2 callersMethodcommandNames
()
tests/scenario/dbt/runner_test.go:208
↓ 2 callersMethodcommitHotIdleLocked
commitHotIdleLocked performs the durable-first Hot → hot_idle transition for a worker the caller has already verified is Hot with activeSessions == 0.
controlplane/k8s_pool_lifecycle.go:172
↓ 2 callersMethodcompactParquet
()
server/querylog.go:376
↓ 2 callersMethodcompleteSharedWorkerReservation
completeSharedWorkerReservation is the slow half of ReserveSharedWorker: adopt/health-check a claimed hot-idle worker, or spawn the slot's pod and res
controlplane/k8s_pool_acquire.go:421
↓ 2 callersFunctioncomputeConnectionUsage
computeConnectionUsage returns the raw billable usage for one connection in integer milli-units, using the *provisioned* worker size over the whole co
controlplane/compute_meter.go:70
↓ 2 callersFunctionconcatNodes
concatNodes left-folds the segments with the || operator.
transpiler/transform/functions_compat.go:312
↓ 2 callersFunctionconfigstoreMetricCounterFamilyTotal
(t *testing.T, metricName string)
tests/configstore/org_connection_limiter_test.go:1394
↓ 2 callersMethodconnDetail
()
server/conn_pg_stat_activity.go:248
↓ 2 callersMethodconnState
connDetail builds a redacted ConnDetail snapshot of this connection for the admin live-query detail view. Query is the ALREADY-redacted currentQuery (
server/conn_pg_stat_activity.go:234
↓ 2 callersFunctionconsumeQuoted
consumeQuoted returns the index just past a single-quoted string that starts at the single quote sql[start]. A pair of adjacent single quotes is an em
transpiler/longident.go:262
↓ 2 callersFunctioncontainsReturningAnyDepth
containsReturningAnyDepth is like containsReturning but matches RETURNING at any parenthesis depth. This is needed for WITH-prefixed queries (writable
server/conn.go:1627
↓ 2 callersFunctioncopyManagedWarehouseConfig
(warehouse *ManagedWarehouse)
controlplane/configstore/models.go:516
↓ 2 callersFunctioncopyWithLatency
copyWithLatency copies data from src to dst, injecting a delay before each write. For zero latency this degrades to a plain io.Copy.
tests/integration/latency_proxy.go:111
↓ 2 callersFunctioncores
(mc: number)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:644
↓ 2 callersMethodcountActiveWorkers
(tx *gorm.DB, where ...any)
controlplane/configstore/store.go:1733
↓ 2 callersFunctioncountDollarParams
countDollarParams counts $N-style parameter placeholders in a query string using a manual byte scan. This avoids pg_query.Parse which may fail on Duck
server/conn.go:1511
↓ 2 callersFunctioncountEvents
(events []string, want string)
controlplane/session_mgr_drain_test.go:952
↓ 2 callersFunctioncpDeploymentPrefix
cpDeploymentPrefix strips the trailing "-<replicaset>-<podsuffix>" from a CP pod name, leaving the prefix every replica shares across rollouts (e.g. "
controlplane/live_aggregator.go:78
↓ 2 callersFunctioncrash_write_hex
internal/crashhandler/handler.c:33
↓ 2 callersFunctioncreateMismatchWorkerPodWithImage
(t *testing.T, cs *fake.Clientset, name, controlPlaneLabel, workerIDLabel, image string)
controlplane/k8s_pool_test.go:3553
↓ 2 callersFunctioncreatePendingWarehouseTx
createPendingWarehouseTx is the inner half of CreatePendingWarehouse — the same logic, but taking an existing *gorm.DB (typically a transaction handle
controlplane/provisioning/store.go:106
↓ 2 callersMethodcreatePlaceholderPod
(ctx context.Context, cpu, mem resource.Quantity)
controlplane/headroom.go:375
↓ 2 callersFunctioncreateS3Secret
createS3Secret creates a DuckDB secret for S3/MinIO access. This is a standalone function so it can be reused by control plane workers. Supports three
server/server.go:1975
↓ 2 callersMethodcreateSessionOnWorker
(ctx context.Context, username string, pid int32, memoryLimit string, threads int, worker *ManagedWorker, prot
controlplane/session_mgr.go:540
↓ 2 callersFunctioncreateSessionWithRegisteredCancel
( srv *server.Server, timeout time.Duration, key server.BackendKey, createFn func(context.Context) (int32,
controlplane/control.go:729
↓ 2 callersFunctioncursorBackwardFlow
cursorBackwardFlow covers the forward-only restriction: backward fetch fails with a clean error. NO SCROLL pins real PostgreSQL to the same forward-on
tests/integration/cursor_test.go:150
↓ 2 callersFunctioncursorLifecycleFlow
cursorLifecycleFlow covers DECLARE → FETCH n → FETCH n (position advances) → FETCH ALL (drains the rest) → FETCH on exhausted cursor (zero rows) → CLO
tests/integration/cursor_test.go:108
↓ 2 callersFunctioncursorMissingFlow
cursorMissingFlow covers FETCH/CLOSE on a cursor that was never declared. Each statement gets its own transaction because the error aborts the transac
tests/integration/cursor_test.go:169
↓ 2 callersFunctioncursorMoveFlow
cursorMoveFlow covers MOVE n advancing the position without returning rows.
tests/integration/cursor_test.go:132
↓ 2 callersFunctiondecodeBinary
decodeBinary decodes binary-format parameter bytes based on type OID. Returns (value, nil) on success, or (nil, error) for malformed data. Per Postgre
server/types.go:875
↓ 2 callersMethoddecodeParams
decodeParams converts raw parameter bytes to Go values based on format codes. Returns (args, nil) on success, or (nil, error) for malformed binary dat
server/conn.go:107
↓ 2 callersMethoddeleteQuery
(handleID string)
server/flightsqlingress/ingress.go:1403
↓ 2 callersMethoddeleteTxn
(txnKey string)
server/flightsqlingress/ingress.go:1317
↓ 2 callersFunctiondeltaCatalogNeedsS3Secret
(catalogPath string, dlCfg DuckLakeConfig)
server/server.go:1797
↓ 2 callersMethoddeparseAndRewriteRefs
deparseAndRewriteRefs deparses a node with CTE references rewritten
transpiler/transform/writablecte.go:711
↓ 2 callersFunctiondeployKey
(p: any)
controlplane/admin/ui/src/pages/nodes/peepernetes.ts:470
↓ 2 callersFunctiondescribeSupportsLimit
describeSupportsLimit returns true if the (uppercased) query supports a LIMIT clause. SHOW, DESCRIBE, EXPLAIN, PRAGMA, CALL etc. do not.
server/conn.go:1551
↓ 2 callersMethoddetachSessionLocked
(pid int32)
controlplane/session_mgr.go:792
↓ 2 callersFunctiondirectSessionConnUses
(fset *token.FileSet, parsed *ast.File)
duckdbservice/session_conn_guard_test.go:52
↓ 2 callersMethoddiscoverPeerIPs
(ctx context.Context)
controlplane/live_aggregator.go:125
↓ 2 callersFunctiondoHealthCheck
doHealthCheck performs a HealthCheck action on the worker. The server sends exactly one Result message with {"healthy": true, ...}. Returns the parsed
controlplane/worker_mgr.go:600
↓ 2 callersMethoddoReleaseQueryHandle
(body []byte, stream flight.FlightService_DoActionServer)
duckdbservice/flight_handler.go:471
↓ 2 callersMethoddoWaitSessionIdle
(body []byte, stream flight.FlightService_DoActionServer)
duckdbservice/flight_handler.go:444
↓ 2 callersMethoddropAndCommit
(ctx context.Context, msg QueryLogKafkaConsumedMessage, dropErr error)
server/querylog_kafka_writer.go:457
↓ 2 callersMethoddropLocked
dropLocked removes any accounting for key (used when an overwrite is about to replace the file under it) so currentSize doesn't double-count. No-op if
cmd/cache-proxy/cache.go:336
↓ 2 callersFunctiondropTemporary
(conn *sql.Conn, query, dropFmt string)
duckdbservice/service.go:1628
↓ 2 callersFunctionduckdbMemoryLimitForPodMemory
duckdbMemoryLimitForPodMemory formats the DuckDB memory_limit for a worker pod of the given memory size: 75% of the pod, leaving the remainder as head
controlplane/control.go:1421
↓ 2 callersMethodeffectiveFlushInterval
()
server/querylog_kafka_writer.go:473
↓ 2 callersFunctionencodeBool
(v interface{})
server/types.go:305
↓ 2 callersFunctionencodeFloat4
(v interface{})
server/types.go:414
↓ 2 callersFunctionencodeFloat8
(v interface{})
server/types.go:435
↓ 2 callersFunctionencodeInt4
(v interface{})
server/types.go:350
↓ 2 callersFunctionencodeInt8
(v interface{})
server/types.go:381
↓ 2 callersFunctionensureWorkerRPCSecretData
(data map[string][]byte)
controlplane/worker_rpc_security.go:30
↓ 2 callersFunctionentry
(over: Partial<AuditEntry>)
controlplane/admin/ui/src/lib/audit.test.ts:5
↓ 2 callersFunctionenvOrDefault
(key, fallback string)
tests/perf/harness_test.go:205
↓ 2 callersFunctionerrorResponseField
(buf []byte, field byte)
server/conn_test.go:1677
↓ 2 callersFunctionevictConnFromPool
evictConnFromPool removes a *sql.Conn's underlying driver connection from the *sql.DB pool so it's not reused by a future caller. The standard librar
duckdbservice/service.go:1594
↓ 2 callersMethodevictOldest
()
cmd/cache-proxy/cache.go:346
↓ 2 callersMethodexec
(query string)
server/conn_skip_until_sync_test.go:38
↓ 2 callersMethodexec
(ctx context.Context, tx *sql.Tx, query string, args ...any)
duckdbservice/service.go:342
↓ 2 callersMethodexecResult
(query string, callIndex int)
server/conn_test.go:1479
↓ 2 callersFunctionexecute
(allowWrite: boolean)
controlplane/admin/ui/src/pages/Impersonate.tsx:58
↓ 2 callersMethodexecuteAndCountRows
(Statement st, String sql)
scripts/client-compat/clients/jdbc/src/main/java/com/posthog/compat/JdbcCompatTest.java:369
↓ 2 callersMethodexecuteIteration
(ctx context.Context, measure bool, measureIteration int, summary *RunSummary)
tests/perf/core/runner.go:111
↓ 2 callersFunctionexecuteUpdateWithTrailer
executeUpdateWithTrailer is a hand-rolled equivalent of flightsql.Client.ExecuteUpdate that exposes the gRPC trailer. ExecuteUpdate is a bidirectiona
server/flightclient/exec_update_trailer.go:31
↓ 2 callersFunctionexplainPlanColumn
explainPlanColumn returns the single column name DuckDB uses for an EXPLAIN result: "analyzed_plan" for EXPLAIN ANALYZE, "physical_plan" otherwise.
server/conn.go:1846
↓ 2 callersFunctionextractInnerContent
extractInnerContent returns the content between the first '(' and last ')'.
duckdbservice/arrowmap/arrowmap.go:179
↓ 2 callersFunctionextractTypeNameFromTypeName
extractTypeNameFromTypeName extracts the lowercase type name from a TypeName node.
transpiler/transform/typecast.go:552
↓ 2 callersMethodfanOut
(ctx context.Context, method, path string)
controlplane/live_aggregator.go:99
↓ 2 callersFunctionfieldNameToFlagName
fieldNameToFlagName converts a CLIInputs Go field name (PascalCase) into the kebab-case flag name. The mapping follows the convention used in root mai
configresolve/cliflags_test.go:26
↓ 2 callersFunctionfileExists
(path string)
server/tlscert/certs.go:37
↓ 2 callersMethodfindIdleAssignedWorkerLocked
(profile *WorkerProfile)
controlplane/org_reserved_pool.go:396
↓ 2 callersMethodflushLoop
()
server/querylog.go:262
↓ 2 callersFunctionfmtAge
(ts: string | number | Date | null | undefined)
controlplane/admin/ui/src/lib/format.ts:110
↓ 2 callersFunctionfmtDurationMs
(ms: number | null | undefined)
controlplane/admin/ui/src/lib/format.ts:82
↓ 2 callersFunctionfmtPercent
(n: number | null | undefined, digits = 1)
controlplane/admin/ui/src/lib/format.ts:37
↓ 2 callersFunctionformatArgValue
(v any)
server/flightclient/flight_executor.go:980
← previousnext →1,501–1,600 of 5,901, ranked by callers