MCPcopy
hub / github.com/wavetermdev/waveterm / dbDeleteFile

Function dbDeleteFile

pkg/filestore/blockstore_dbops.go:29–37  ·  view source on GitHub ↗
(ctx context.Context, zoneId string, name string)

Source from the content-addressed store, hash-verified

27}
28
29func dbDeleteFile(ctx context.Context, zoneId string, name string) error {
30 return WithTx(ctx, func(tx *TxWrap) error {
31 query := "DELETE FROM db_wave_file WHERE zoneid = ? AND name = ?"
32 tx.Exec(query, zoneId, name)
33 query = "DELETE FROM db_file_data WHERE zoneid = ? AND name = ?"
34 tx.Exec(query, zoneId, name)
35 return nil
36 })
37}
38
39func dbGetZoneFileNames(ctx context.Context, zoneId string) ([]string, error) {
40 return WithTxRtn(ctx, func(tx *TxWrap) ([]string, error) {

Callers 1

DeleteFileMethod · 0.85

Calls 1

WithTxFunction · 0.70

Tested by

no test coverage detected