SurrealDbNamespaceResource
Handle
A resource that represents a SurrealDB namespace that is a child of a SurrealDB container resource.
type SurrealDbNamespaceResource interface { ExpressionValue Resource ResourceWithConnectionString ResourceWithParent}6 members
Properties
property
ConnectionStringExpression *ReferenceExpression getGets the connection string expression for the SurrealDB database.
ConnectionStringExpression() *ReferenceExpressionproperty
Databasesmap[string]string getA dictionary where the key is the resource name and the value is the database name.
Databases() (map[string]string, error)property
NamespaceName stringgetGets the namespace name.
NamespaceName() (string, error)property
ParentSurrealDbServerResource getGets the parent SurrealDB container resource.
Parent() SurrealDbServerResourceMethods
Adds a SurrealDB database resource to the application model
AddDatabase( name string, options ...*AddDatabaseOptions,) SurrealDbDatabaseResourceParameters
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.options...*AddDatabaseOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*AddDatabaseOptions argument.
DatabaseName *stringThe name of the database. If not provided, this defaults to the same value as name.Returns
SurrealDbDatabaseResource A reference to the I.
Returns a handle; failures surface later via Err().
Defines the SQL script used to create the namespace.
WithCreationScript(script string) SurrealDbNamespaceResourceParameters
scriptstringThe SQL script used to create the namespace.Returns
SurrealDbNamespaceResource A reference to the I.
Returns a handle; failures surface later via Err().