(v *C.sqlite3_value)
| 233 | } |
| 234 | |
| 235 | func callbackArgBytes(v *C.sqlite3_value) (reflect.Value, error) { |
| 236 | switch C.sqlite3_value_type(v) { |
| 237 | case C.SQLITE_BLOB: |
| 238 | l := C.sqlite3_value_bytes(v) |
| 239 | p := C.sqlite3_value_blob(v) |
| 240 | return reflect.ValueOf(C.GoBytes(p, l)), nil |
| 241 | case C.SQLITE_TEXT: |
| 242 | l := C.sqlite3_value_bytes(v) |
| 243 | c := unsafe.Pointer(C.sqlite3_value_text(v)) |
| 244 | return reflect.ValueOf(C.GoBytes(c, l)), nil |
| 245 | default: |
| 246 | return reflect.Value{}, fmt.Errorf("argument must be BLOB or TEXT") |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | func callbackArgString(v *C.sqlite3_value) (reflect.Value, error) { |
| 251 | switch C.sqlite3_value_type(v) { |
no outgoing calls
no test coverage detected