private MySqlSchemaCollection GetParametersForRoutineFromIS(string[] restrictions)
{
string[] keys = new string[]
{
"SPECIFIC_CATALOG",
"SPECIFIC_SCHEMA",
"SPECIFIC_NAME",
"ROUTINE_TYPE",
"PARAMETER_NAME"
};
StringBuilder stringBuilder = new StringBuilder("SELECT * FROM INFORMATION_SCHEMA.PARAMETERS");
string whereClause = ISSchemaProvider.GetWhereClause(null, keys, restrictions);
if (!string.IsNullOrEmpty(whereClause))
{
stringBuilder.AppendFormat(CultureInfo.InvariantCulture, " WHERE {0}", new object[]
{
whereClause
});
}
MySqlSchemaCollection mySqlSchemaCollection = base.QueryCollection("parameters", stringBuilder.ToString());
if (mySqlSchemaCollection.Rows.Count != 0 && (string)mySqlSchemaCollection.Rows[0]["routine_type"] == "FUNCTION")
{
mySqlSchemaCollection.Rows[0]["parameter_mode"] = "IN";
mySqlSchemaCollection.Rows[0]["parameter_name"] = "return_value";
}
return(mySqlSchemaCollection);
}