return not found if no records.

This commit is contained in:
Haiping Chen 2024-09-23 20:33:42 -05:00
parent 0e2a457d86
commit 8c460d54b2

View file

@ -29,7 +29,15 @@ public class ExecuteQueryFn : IFunctionCallback
_ => throw new NotImplementedException($"Database type {settings.DatabaseType} is not supported.")
};
message.Content = JsonSerializer.Serialize(results);
if (results.Count() == 0)
{
message.Content = "No record found";
}
else
{
message.Content = JsonSerializer.Serialize(results);
}
return true;
}