MCPcopy Index your code
hub / github.com/CovenantSQL/CovenantSQL / updateBlockData

Function updateBlockData

cmd/cql-fuse/sql.go:104–110  ·  view source on GitHub ↗

updateBlockData overwrites the data for a single block.

(e sqlExecutor, inodeID uint64, block int, data []byte)

Source from the content-addressed store, hash-verified

102
103// updateBlockData overwrites the data for a single block.
104func updateBlockData(e sqlExecutor, inodeID uint64, block int, data []byte) error {
105 const sql = `UPDATE fs_block SET data = ? WHERE (id, block) = (?, ?)`
106 if _, err := e.Exec(sql, data, inodeID, block); err != nil {
107 return err
108 }
109 return nil
110}
111
112type blockInfo struct {
113 block int

Callers 3

shrinkFunction · 0.85
growFunction · 0.85
writeFunction · 0.85

Calls 1

ExecMethod · 0.65

Tested by

no test coverage detected