/** * call-seq: * function_type( db, name, type ) -> nil * * Allows you to specify the type of the data that the named function returns. If * type is SQLite::API::NUMERIC, then the function is expected to return a numeric * value. If it is SQLite::API::TEXT, then the function is expected to return a * textual value. If it is SQLite::API::ARGS, then the function returns whatever its * arguments are. And if it is a positive (or zero) integer, then the function * returns whatever type the argument at that position is. */ static VALUE static_api_function_type( VALUE module, VALUE db, VALUE name, VALUE type ) { sqlite *handle; int result; GetDB( handle, db ); Check_Type( name, T_STRING ); Check_Type( type, T_FIXNUM ); result = sqlite_function_type( handle, StringValuePtr( name ), FIX2INT( type ) ); if( result != SQLITE_OK ) { static_raise_db_error( result, "function type %s(%d)", StringValuePtr(name), FIX2INT(type) ); /* "raise" does not return */ } return Qnil; }