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

Function dbGetZoneFile

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

Source from the content-addressed store, hash-verified

46}
47
48func dbGetZoneFile(ctx context.Context, zoneId string, name string) (*WaveFile, error) {
49 return WithTxRtn(ctx, func(tx *TxWrap) (*WaveFile, error) {
50 query := "SELECT * FROM db_wave_file WHERE zoneid = ? AND name = ?"
51 file := dbutil.GetMappable[*WaveFile](tx, query, zoneId, name)
52 return file, nil
53 })
54}
55
56func dbGetAllZoneIds(ctx context.Context) ([]string, error) {
57 return WithTxRtn(ctx, func(tx *TxWrap) ([]string, error) {

Callers 1

loadFileForReadMethod · 0.85

Calls 1

WithTxRtnFunction · 0.70

Tested by

no test coverage detected