/*
* Class method: sql_replace_placeholders(sql, params)
* sql: a SQL command containing placeholders for values.
* params: a list of values for the placeholders, as a Gda::ParameterList
* object.
*
* Replaces the placeholders (:name) in the given SQL command with the values
* from the Gda::ParameterList specified as the params argument.
*
* Returns: the SQL string with all placeholders replaced, or nil on error.
*/
static VALUE rb_gda_sql_replace_placeholders(self, text, plist)
VALUE text, plist;
{
const gchar *sql = gda_sql_replace_placeholders(RVAL2CSTR(text),
RGDA_PARAMETER_LIST(plist));
return sql != NULL
? CSTR2RVAL(sql)
: Qnil;
}