MCPcopy
hub / github.com/sqlc-dev/sqlc / Index

Method Index

internal/sql/astutils/rewrite.go:92–97  ·  view source on GitHub ↗

Index reports the index >= 0 of the current Node in the slice of Nodes that contains it, or a value < 0 if the current Node is not part of a slice. The index of the current node changes if InsertBefore is called while processing the current node.

()

Source from the content-addressed store, hash-verified

90// The index of the current node changes if InsertBefore is called while
91// processing the current node.
92func (c *Cursor) Index() int {
93 if c.iter != nil {
94 return c.iter.index
95 }
96 return -1
97}
98
99// field returns the current node's parent field value.
100func (c *Cursor) field() reflect.Value {

Callers 4

ReplaceMethod · 0.95
applyListMethod · 0.80
ParseMethod · 0.80

Calls

no outgoing calls

Tested by 1