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
↓ 3 callers
Function
writeFixtureRunDir
(t *testing.T)
tests/perf/publisher/publisher_test.go:284
↓ 2 callers
Method
AcquireWorker
AcquireWorker returns a worker for a new session. The multi-tenant OrgReservedPool (k8s/remote) reuses a hot-idle worker of the requested shape for th
controlplane/worker_pool.go:59
↓ 2 callers
Method
BeginTransaction
(ctx context.Context, req flightsql.ActionBeginTransactionRequest)
duckdbservice/flight_handler.go:885
↓ 2 callers
Method
CRMetadataStores
(ctx context.Context)
controlplane/admin/ducklings_metadata.go:26
↓ 2 callers
Method
Capture
Capture enqueues a PostHog capture message. Enqueue is asynchronous (the posthog-go client batches and flushes on a background goroutine), so this doe
internal/analytics/analytics.go:68
↓ 2 callers
Method
Close
(summary RunSummary, serverMetrics string)
tests/perf/core/sink.go:84
↓ 2 callers
Method
CloseAll
()
duckdbservice/service.go:938
↓ 2 callers
Method
CloseByToken
(token string)
server/flightsqlingress/ingress.go:1708
↓ 2 callers
Function
CloseConnectionMetrics
CloseConnectionMetrics records the completed connection's lifetime in the duckgres_connection_duration_seconds histogram (per org) and returns the ela
server/exports.go:290
↓ 2 callers
Method
CloseFlightSessionRecord
(sessionToken string, closedAt time.Time)
controlplane/control.go:249
↓ 2 callers
Method
CloseSend
()
controlplane/session_mgr_drain_test.go:502
↓ 2 callers
Function
ConfigureDBConnection
ConfigureDBConnection initializes an existing DuckDB connection with pg_catalog, information_schema, and DuckLake catalog attachment.
server/server.go:1205
↓ 2 callers
Function
ContainsPersistentSecretDDL
ContainsPersistentSecretDDL reports whether any top-level statement in query is CREATE/DROP PERSISTENT SECRET. Unlike Classify (which inspects only th
server/usersecrets/classify.go:96
↓ 2 callers
Function
ConvertAlterTableToAlterView
ConvertAlterTableToAlterView transforms an ALTER TABLE RENAME statement to ALTER VIEW RENAME. This is used to retry failed ALTER TABLE commands when D
transpiler/transpiler.go:1053
↓ 2 callers
Function
ConvertDropTableToDropView
ConvertDropTableToDropView transforms a DROP TABLE [IF EXISTS] statement to DROP VIEW [IF EXISTS]. This is used to retry failed DROP TABLE commands wh
transpiler/transpiler.go:1090
↓ 2 callers
Method
CopyFromStdin
(ctx context.Context, copySQLTemplate string, csv io.Reader)
server/sqlcore/interfaces.go:75
↓ 2 callers
Method
CountAdmins
CountAdmins returns the number of operators with the admin role. Used by the last-admin guard so the admin role can never be fully removed from the ta
controlplane/configstore/operators.go:97
↓ 2 callers
Method
CountHotIdleWorkers
(orgID, image, profileCPU, profileMemory string)
controlplane/worker_pool.go:133
↓ 2 callers
Function
CreatePassthroughDBConnection
CreatePassthroughDBConnection creates a DuckDB connection without pg_catalog or information_schema initialization. DuckLake is still attached if confi
server/server.go:1310
↓ 2 callers
Method
CreateSession
CreateSession acquires a worker from the configured pool, creates a session on it, and rebalances memory/thread limits across all active sessions. If
controlplane/session_mgr.go:330
↓ 2 callers
Method
CreateSession
(ctx context.Context, username string, pid int32, memoryLimit string, threads int)
server/flightsqlingress/ingress.go:79
↓ 2 callers
Function
DefaultCompareOptions
DefaultCompareOptions returns sensible defaults for comparison
tests/integration/compare.go:49
↓ 2 callers
Function
DefaultConfig
DefaultConfig returns the default harness configuration
tests/integration/harness.go:58
↓ 2 callers
Method
DeleteOrgUserSecret
(orgID, username, secretName string)
controlplane/admin/secrets_api.go:16
↓ 2 callers
Method
DeleteSecret
DeleteSecret removes one stored secret, reporting whether it existed.
server/conn_user_secrets.go:27
↓ 2 callers
Function
DeltaCatalogPath
DeltaCatalogPath resolves the Delta catalog path for a worker config: if the config sets an explicit DeltaCatalogPath, that wins; otherwise, fall back
server/ducklake/migration.go:701
↓ 2 callers
Method
Deprovision
(ctx context.Context, orgID string)
tests/scenario/provision/client.go:118
↓ 2 callers
Method
DoAction
(action *flight.Action, stream pb.FlightService_DoActionServer)
server/flightclient/flight_executor_test.go:133
↓ 2 callers
Method
DoGet
(_ *flight.Ticket, stream pb.FlightService_DoGetServer)
server/flightclient/flight_executor_test.go:101
↓ 2 callers
Method
DoPut
(stream pb.FlightService_DoPutServer)
server/flightclient/exec_update_trailer_test.go:27
↓ 2 callers
Method
Draining
()
controlplane/runtime_tracker.go:96
↓ 2 callers
Method
Draining
()
server/flightsqlingress/ingress.go:1821
↓ 2 callers
Function
DuckDBDSN
DuckDBDSN returns the DSN openBaseDB / the duckdbservice pair builder use for cfg/username. Exported so duckdbservice (which holds the duckdb-go-v2 im
server/server.go:872
↓ 2 callers
Method
Enabled
Enabled returns true if any underlying handler is enabled for the given level.
internal/cliboot/logging.go:190
↓ 2 callers
Method
EndTransaction
(ctx context.Context, req flightsql.ActionEndTransactionRequest)
duckdbservice/flight_handler.go:928
↓ 2 callers
Function
EnsureMigrationCheck
connStr (string) -> *sync.Mutex EnsureMigrationCheck runs the migration check, retrying on transient errors. Once the check succeeds (regardless of wh
server/ducklake/migration.go:56
↓ 2 callers
Method
Error
()
tests/scenario/sql/errors.go:23
↓ 2 callers
Method
ErrorClass
()
tests/scenario/provision/errors.go:69
↓ 2 callers
Method
Execute
(context.Context, QueryRequest)
tests/scenario/sql/driver.go:13
↓ 2 callers
Method
ExecuteStep
(ctx context.Context, step core.Step)
tests/scenario/dbt/steps.go:139
↓ 2 callers
Method
ExpireControlPlaneInstances
(cutoff time.Time)
controlplane/janitor.go:18
↓ 2 callers
Method
ExpireDrainingControlPlaneInstances
(before time.Time)
controlplane/janitor.go:19
↓ 2 callers
Method
ExpireFlightSessionRecords
(before time.Time)
controlplane/janitor.go:24
↓ 2 callers
Method
FetchMessage
(context.Context)
server/querylog_kafka_writer.go:63
↓ 2 callers
Function
GeneratePassword
GeneratePassword returns a cryptographically random 32-byte URL-safe password.
controlplane/configstore/store.go:582
↓ 2 callers
Function
GenerateSelfSignedCert
GenerateSelfSignedCert writes a fresh self-signed certificate and ECDSA private key to the given paths. Used directly by tests that need a cert pair o
server/tlscert/certs.go:46
↓ 2 callers
Method
GetAction
()
duckdbservice/flight_handler_test.go:59
↓ 2 callers
Method
GetFlightInfoSchemas
(ctx context.Context, cmd flightsql.GetDBSchemas, desc *flight.FlightDescriptor)
server/flightsqlingress/ingress.go:872
↓ 2 callers
Method
GetIncludeSchema
()
duckdbservice/flight_handler_test.go:115
↓ 2 callers
Method
GetManagedWarehouse
(orgID string)
controlplane/provisioning/api.go:72
↓ 2 callers
Method
GetManagedWarehouse
GetManagedWarehouse returns the managed-warehouse row for an org. Direct DB query (not snapshot-based); returns gorm.ErrRecordNotFound when the org ha
controlplane/configstore/store.go:657
↓ 2 callers
Method
GetManagedWarehouse
(orgID string)
controlplane/admin/api.go:139
↓ 2 callers
Method
GetOrg
(name string)
controlplane/admin/api.go:129
↓ 2 callers
Method
GetPgBouncerEnabled
GetPgBouncerEnabled reads spec.metadataStore.pgbouncer.enabled from the named Duckling CR. Missing blocks (composition at an older schema, CR never ca
controlplane/provisioner/k8s_client.go:328
↓ 2 callers
Method
GetQuery
()
duckdbservice/flight_handler_test.go:145
↓ 2 callers
Method
GetSession
(sessionToken string)
server/flightsqlingress/ingress.go:114
↓ 2 callers
Method
GetTableNameFilterPattern
()
duckdbservice/flight_handler_test.go:107
↓ 2 callers
Method
GetUser
(orgID, username string)
controlplane/admin/api.go:269
↓ 2 callers
Method
Handle
Handle dispatches the log record to each underlying handler that is enabled for the record's level.
internal/cliboot/logging.go:200
↓ 2 callers
Method
Handle
(_ context.Context, r slog.Record)
cmd/cache-proxy/main.go:44
↓ 2 callers
Method
HandlePeerGet
HandlePeerGet returns cached data to a peer.
cmd/cache-proxy/proxy.go:789
↓ 2 callers
Method
HasVersion
(version string)
tests/perf/datasets/runtime.go:77
↓ 2 callers
Method
HealthCheckLoop
HealthCheckLoop periodically checks worker health and handles crashed workers. In the elastic 1:1 model, crashed workers with active sessions trigger
controlplane/worker_mgr.go:1116
↓ 2 callers
Function
IncrementOpenConnections
IncrementOpenConnections increments the open connections gauge.
server/observe/metrics.go:16
↓ 2 callers
Method
IncrementOwnerEpoch
()
controlplane/worker_mgr.go:95
↓ 2 callers
Function
InitAnalytics
InitAnalytics installs a PostHog product-analytics tracker when POSTHOG_API_KEY is set, reusing the same POSTHOG_API_KEY / POSTHOG_HOST env vars as th
internal/cliboot/analytics.go:17
↓ 2 callers
Method
IsMigratingForOrg
(_ string)
controlplane/org_router_test_helpers_test.go:14
↓ 2 callers
Method
ListExpiredHotIdleWorkersForCP
ListExpiredHotIdleWorkersForCP is the owner-scoped variant of ListExpiredHotIdleWorkers: it returns only expired hot-idle workers owned by ownerCPInst
controlplane/configstore/store.go:1184
↓ 2 callers
Method
ListLiveControlPlaneInstanceIDs
ListLiveControlPlaneInstanceIDs returns the IDs of control-plane instances that are not yet expired — i.e. either currently active OR draining (still
controlplane/configstore/store.go:933
↓ 2 callers
Method
ListOrgUserSecrets
(orgID, username string)
controlplane/admin/secrets_api.go:15
↓ 2 callers
Method
ListStuckWorkers
ListStuckWorkers returns workers stuck in spawning, reserved, or activating beyond their respective cutoffs.
controlplane/configstore/store.go:1696
↓ 2 callers
Function
LoadFile
LoadFile reads a duckgres.yaml file from disk and parses it. Returns the caller-friendly error from os.ReadFile (so a missing file is recognizable via
configloader/load.go:13
↓ 2 callers
Function
LoadManifest
(path string)
tests/perf/datasets/runtime.go:56
↓ 2 callers
Method
MarkDead
MarkDead marks this executor's backing worker as dead. All subsequent RPC calls will return ErrWorkerDead without touching the (possibly closed) gRPC
server/flightclient/flight_executor.go:125
↓ 2 callers
Method
MarkDraining
()
controlplane/runtime_tracker.go:80
↓ 2 callers
Method
MarkLostFromLease
MarkLostFromLease performs the lease-fenced CAS that transitions a worker row to lost. Used by the health-checker after it has confirmed the worker is
controlplane/worker_lifecycle.go:237
↓ 2 callers
Method
MarkWorkerDraining
(workerID int, ownerCPInstanceID string, expectedOwnerEpoch int64)
controlplane/worker_lifecycle.go:39
↓ 2 callers
Method
MarkWorkerTerminalIfCurrent
MarkWorkerTerminalIfCurrent moves an observed active worker row to a terminal state only if the durable row still matches that observation. It is the
controlplane/configstore/store.go:1221
↓ 2 callers
Method
Name
()
transpiler/transform/onconflict.go:35
↓ 2 callers
Function
NewArtifactSink
(dir string)
tests/perf/core/sink.go:20
↓ 2 callers
Function
NewBooleanPredicateTransform
()
transpiler/transform/boolpredicates.go:13
↓ 2 callers
Function
NewCacheProxy
(store *DiskCache, peers *PeerManager, cacheHostSuffixes []string)
cmd/cache-proxy/proxy.go:112
↓ 2 callers
Function
NewClientConn
NewClientConn creates a clientConn with pre-initialized fields for use by the control plane worker. The returned value is opaque (*clientConn) but can
server/exports.go:53
↓ 2 callers
Function
NewDDLTransform
NewDDLTransform creates a new DDLTransform driven by the given DDL policy.
transpiler/transform/ddl.go:19
↓ 2 callers
Function
NewDiskCache
NewDiskCache creates a cache backed by the given directory. maxPercent is the percentage of filesystem capacity to use (e.g. 80).
cmd/cache-proxy/cache.go:91
↓ 2 callers
Function
NewExecutor
(cfg ExecutorConfig)
tests/scenario/dbt/steps.go:91
↓ 2 callers
Function
NewFlightIngress
NewFlightIngress creates a control-plane Flight SQL ingress listener.
controlplane/flight_ingress.go:24
↓ 2 callers
Function
NewInformationSchemaTransformWithConfig
NewInformationSchemaTransformWithConfig creates a new InformationSchemaTransform with configuration.
transpiler/transform/information_schema.go:25
↓ 2 callers
Function
NewOrgSessionManager
NewOrgSessionManager builds a SessionManager whose log lines all carry the owning org (multi-tenant remote backend: one manager per org stack).
controlplane/session_mgr.go:130
↓ 2 callers
Function
NewPeerManager
(serviceName, peerPort string)
cmd/cache-proxy/peers.go:51
↓ 2 callers
Function
NewPinnedExecutor
(conn *sql.Conn, db *sql.DB)
server/executor.go:89
↓ 2 callers
Function
NewPlaceholderTransform
NewPlaceholderTransform creates a new PlaceholderTransform.
transpiler/transform/placeholder.go:12
↓ 2 callers
Function
NewSTSBroker
NewSTSBroker creates an STS broker using the control plane's own credentials.
controlplane/sts_broker.go:165
↓ 2 callers
Function
NewSharedWorkerActivator
(shared *K8sWorkerPool, stsBroker *STSBroker, defaultSpecVersion string, resolveOrgConfig func(string) (*confi
controlplane/shared_worker_activator.go:79
↓ 2 callers
Function
NewTestHarness
NewTestHarness creates a new test harness
tests/integration/harness.go:72
↓ 2 callers
Function
NewTypeMappingTransform
()
transpiler/transform/types.go:13
↓ 2 callers
Function
NewWritableCTETransform
()
transpiler/transform/writablecte.go:29
↓ 2 callers
Method
NotFound
()
tests/scenario/provision/errors.go:73
↓ 2 callers
Method
OrgDefaultWorkerMinHotIdle
OrgDefaultWorkerMinHotIdle returns the org's operator-set default-profile hot-idle floor. 0 means disabled, including unknown orgs and a nil snapshot.
controlplane/configstore/store.go:471
↓ 2 callers
Method
OrgDefaultWorkerProfile
OrgDefaultWorkerProfile returns the org's operator-set default worker profile from the current snapshot: cpu/memory as k8s resource-quantity strings a
controlplane/configstore/store.go:456
← previous
next →
1,301–1,400 of 5,901, ranked by callers