NeonStorage
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:29
storage capability for Neon, bound to the single project named by the projectId option.
Implements
Section titled “Implements”Storage
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new NeonStorage(
client,opts):NeonStorage
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:35
Parameters
Section titled “Parameters”client
Section titled “client”() => object
StorageOptions
Returns
Section titled “Returns”NeonStorage
Properties
Section titled “Properties”
readonlykey:"storage"
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:31
Capability key; always "storage".
Implementation of
Section titled “Implementation of”Storage.key
providerName
Section titled “providerName”
readonlyproviderName:"neon"="neon"
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:33
Provider name; always "neon".
Implementation of
Section titled “Implementation of”Storage.providerName
Methods
Section titled “Methods”createBranch()
Section titled “createBranch()”createBranch(
input):Promise<StorageBranch>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:66
Creates a branch (optionally from the from parent branch id) with a read-write endpoint, so its connection string works at once.
Parameters
Section titled “Parameters”string
string
Returns
Section titled “Returns”Promise<StorageBranch>
Implementation of
Section titled “Implementation of”Storage.createBranch
destroyBranch()
Section titled “destroyBranch()”destroyBranch(
branch):Promise<void>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:78
Deletes the branch with the given id from the bound project.
Parameters
Section titled “Parameters”branch
Section titled “branch”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Storage.destroyBranch
enableExtension()
Section titled “enableExtension()”enableExtension(
input):Promise<void>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:88
Provider-specific feature toggle. For Postgres providers this is
CREATE EXTENSION IF NOT EXISTS ... per branch.
Parameters
Section titled “Parameters”branch
Section titled “branch”string
extension
Section titled “extension”string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Storage.enableExtension
getConnectionString()
Section titled “getConnectionString()”getConnectionString(
scope,options?):Promise<string>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:46
Connection string for the given scope. Scope is provider-specific:
- branch-based providers (Neon, PlanetScale): scope = branch name or id
- flat providers (single Postgres instance): scope is ignored
Callers (or the orchestrator) decide how a deploy target maps to a scope; the storage plugin doesn’t own that mapping.
Parameters
Section titled “Parameters”string
options?
Section titled “options?”ConnectionStringOptions = {}
Returns
Section titled “Returns”Promise<string>
Implementation of
Section titled “Implementation of”Storage.getConnectionString
listBranches()
Section titled “listBranches()”listBranches():
Promise<StorageBranch[]>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:60
Lists every branch of the bound project, mapped to StorageBranch.
Returns
Section titled “Returns”Promise<StorageBranch[]>
Implementation of
Section titled “Implementation of”Storage.listBranches
resetBranch()
Section titled “resetBranch()”resetBranch(
input):Promise<void>
Defined in: plugins/holocron-plugin-neon/src/capabilities/storage.ts:82
Restore one branch to match another (e.g., reset preview → main).
Parameters
Section titled “Parameters”branch
Section titled “branch”string
string
Returns
Section titled “Returns”Promise<void>
Implementation of
Section titled “Implementation of”Storage.resetBranch