SurrealDbNamespaceResource.AddDatabase
Method
type SurrealDbNamespaceResource interface { // ... omitted for brevity AddDatabase( name string, options ...*AddDatabaseOptions, ) SurrealDbDatabaseResource}Signature
method
AddDatabase builderAdds 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().
Defined on
This method is defined on the following type: