MCPcopy
hub / github.com/jmoiron/sqlx / isUnsafe

Function isUnsafe

sqlx.go:109–144  ·  view source on GitHub ↗

determine if any of our extensions are unsafe

(i interface{})

Source from the content-addressed store, hash-verified

107
108// determine if any of our extensions are unsafe
109func isUnsafe(i interface{}) bool {
110 switch v := i.(type) {
111 case Row:
112 return v.unsafe
113 case *Row:
114 return v.unsafe
115 case Rows:
116 return v.unsafe
117 case *Rows:
118 return v.unsafe
119 case NamedStmt:
120 return v.Stmt.unsafe
121 case *NamedStmt:
122 return v.Stmt.unsafe
123 case Stmt:
124 return v.unsafe
125 case *Stmt:
126 return v.unsafe
127 case qStmt:
128 return v.unsafe
129 case *qStmt:
130 return v.unsafe
131 case DB:
132 return v.unsafe
133 case *DB:
134 return v.unsafe
135 case Tx:
136 return v.unsafe
137 case *Tx:
138 return v.unsafe
139 case sql.Rows, *sql.Rows:
140 return false
141 default:
142 return false
143 }
144}
145
146func mapperFor(i interface{}) *reflectx.Mapper {
147 switch i := i.(type) {

Callers 7

PreparexFunction · 0.85
scanAllFunction · 0.85
PreparexContextFunction · 0.85
QueryxContextMethod · 0.85
QueryxMethod · 0.85
TestMissingNamesFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestMissingNamesFunction · 0.68