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

Function updateNode

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

updateNode updates an existing node descriptor.

(e sqlExecutor, node *Node)

Source from the content-addressed store, hash-verified

80
81// updateNode updates an existing node descriptor.
82func updateNode(e sqlExecutor, node *Node) error {
83 inode := node.toJSON()
84 const sql = `
85UPDATE fs_inode SET inode = ? WHERE id = ?;
86`
87 if _, err := e.Exec(sql, inode, node.ID); err != nil {
88 return err
89 }
90 return nil
91}
92
93// getBlockData returns the block data for a single block.
94func getBlockData(e sqlExecutor, inodeID uint64, block int) ([]byte, error) {

Callers 2

SetattrMethod · 0.85
WriteMethod · 0.85

Calls 2

toJSONMethod · 0.80
ExecMethod · 0.65

Tested by

no test coverage detected