| 398 | unsafe { sqlite3ext_context_db_handle(context) } |
| 399 | } |
| 400 | pub fn overload_function(db: *mut sqlite3, func_name: &str, n_args: i32) -> crate::Result<()> { |
| 401 | let cname = CString::new(func_name)?; |
| 402 | let result = unsafe { sqlite3ext_overload_function(db, cname.as_ptr(), n_args) }; |
| 403 | if result != SQLITE_OKAY { |
| 404 | return Err(Error::new_message("TODO")); |
| 405 | } |
| 406 | Ok(()) |
| 407 | } |
| 408 | /// A columns "affinity". <https://www.sqlite.org/datatype3.html#type_affinity> |
| 409 | /* TODO maybe include extra affinities? |
| 410 | - JSON - parse as text, see if it's JSON, if so then set subtype |