EndpointDatabase class Endpoint

Endpoint for database management.

Inheritance

Constructors

EndpointDatabase(EndpointCaller caller)

Properties

caller → EndpointCaller
Holds a reference to the caller class.
finalinherited
client ↔ ServerpodClientShared
Reference to the client.
latefinalinherited
hashCode → int
The hash code for this object.
no setterinherited
name → String
The name of the endpoint this reference is connected to.
no setteroverride
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createSnapshot({required String cloudCapsuleId, String? name, DateTime? expiresAt}) → Future<DatabaseSnapshot>
Creates a manual snapshot of the capsule's database.
createSuperUser({required String cloudCapsuleId, required String username}) → Future<String>
Creates a new super user in the database. Returns the password for the new user.
deleteDatabaseUser({required String cloudCapsuleId, required String username}) → Future<void>
Deletes a user from the database.
deleteSnapshot({required String cloudCapsuleId, required String snapshotId}) → Future<void>
Deletes a snapshot of the capsule's database.
enableDatabase({required String cloudCapsuleId}) → Future<void>
Enables the database for a project.
getBackupSchedule({required String cloudCapsuleId}) → Future<BackupSchedule?>
Returns the automated backup schedule for the capsule's database, or null if none is configured.
getConnectionDetails({required String cloudCapsuleId}) → Future<DatabaseConnection>
Returns the connection details for a database resource. Throws NotFoundException if the database is not found.
listDatabaseUsers({required String cloudCapsuleId}) → Future<List<DatabaseUser>>
Lists the user-created superusers of the database.
listSnapshots({required String cloudCapsuleId}) → Future<List<DatabaseSnapshot>>
Lists the snapshots of the capsule's database.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
readDatabase({required String cloudCapsuleId}) → Future<DatabaseInfo>
Returns persisted database capacity and quota for cloudCapsuleId.
resetDatabasePassword({required String cloudCapsuleId, required String username}) → Future<String>
Resets the password for a user in the database. Returns the new password for the user.
restoreFromSnapshot({required String cloudCapsuleId, required String snapshotId}) → Future<void>
Restores the capsule's live database to the given snapshot.
setBackupSchedule({required String cloudCapsuleId, BackupFrequency? frequency, int? day, int? hour, Duration? retention}) → Future<void>
Sets the automated backup schedule for the capsule's database.
toString() → String
A string representation of this object.
inherited
updateDatabaseSize({required String cloudCapsuleId, required DatabaseSizeOption size, double? minCu, double? maxCu}) → Future<DatabaseResource>
Updates the size and the autoscaling CU limits for a capsule's database, changing the procured database product if necessary. The size and limits are validated against the constraints of the capsule's product.
wipeDatabase({required String cloudCapsuleId}) → Future<void>
Wipes the database by deleting and recreating it. This will drop all tables and data in the database. The deployment will error until a redeploy is performed.

Operators

operator ==(Object other) → bool
The equality operator.
inherited