MCPcopy Create free account
hub / github.com/devaccuracy/ledgerforge / DeleteAccount

Method DeleteAccount

database/account.go:357–365  ·  view source on GitHub ↗

DeleteAccount deletes a specific account from the database. It removes the account with the given account ID from the accounts table. Parameters: - id: The unique ID of the account to be deleted. Returns: - An error if the deletion fails, otherwise returns nil.

(id string)

Source from the content-addressed store, hash-verified

355// Returns:
356// - An error if the deletion fails, otherwise returns nil.
357func (d Datasource) DeleteAccount(id string) error {
358 // Execute the SQL delete statement
359 _, err := d.Conn.ExecContext(context.Background(), `
360 DELETE FROM ledgerforge.accounts WHERE account_id = $1
361 `, id)
362
363 // Return any errors encountered during the deletion
364 return err
365}
366
367// GetAllAccountsWithFilter retrieves accounts with advanced filtering support.
368// It delegates to GetAllAccountsWithFilterAndOptions with nil options.

Callers 2

Calls

no outgoing calls

Tested by 2