commit
f73d73482b
|
|
@ -182,8 +182,11 @@ public class PluginLoader
|
|||
foreach (var agentId in plugin.AgentIds)
|
||||
{
|
||||
var agent = agentService.LoadAgent(agentId).Result;
|
||||
agent.Disabled = true;
|
||||
agentService.UpdateAgent(agent, AgentField.Disabled);
|
||||
if (agent != null)
|
||||
{
|
||||
agent.Disabled = true;
|
||||
agentService.UpdateAgent(agent, AgentField.Disabled);
|
||||
}
|
||||
}
|
||||
}
|
||||
return plugin;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Use the TwoStagePlanner approach to plan the overall implementation steps, follow the below steps strictly.
|
||||
1. call plan_primary_stage to generate the primary plan.
|
||||
2. If need_additional_information is true, call plan_secondary_stage for the specific primary stage.
|
||||
3. You must call plan_summary as the last planning step to summarize the final query.
|
||||
3. You must call plan_summary for you final planned output.
|
||||
|
||||
*** IMPORTANT ***
|
||||
Don't run the planning process repeatedly if you have already got the result of user's request.
|
||||
|
|
|
|||
|
|
@ -14,5 +14,7 @@ VALUES ((SELECT MAX(Id) + 1 FROM data_Service), 'HVAC');
|
|||
If the table structure didn't mention auto incremental, the data field id needs to insert id manually and you need to use max(id) instead of LAST_INSERT_ID function.
|
||||
For example, you should use SET @id = select max(id) from table;
|
||||
|
||||
* the alias of the table name in the sql query should be identical.
|
||||
*** the alias of the table name in the sql query should be identical. ***
|
||||
*** the generated sql query MUST be basedd on the provided table structure. ***
|
||||
*** All queries return a maximum of 20 records. ***
|
||||
*** Only select user friendly columns. ***
|
||||
|
|
|
|||
|
|
@ -7,6 +7,6 @@ The query must exactly based on the provided table structure. And carefully revi
|
|||
Note: Output should be only the sql query with sql comments that can be directly run in SQL Server.
|
||||
|
||||
*** the alias of the table name in the sql query should be identical. ***
|
||||
*** The generated sql query MUST be basedd on the provided table structure. ***
|
||||
*** The generated sql query MUST be based on the provided table structure. ***
|
||||
*** All queries return a maximum of 10 records. ***
|
||||
*** Only select user friendly columns. ***
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class ExecuteQueryFn : IFunctionCallback
|
|||
private IEnumerable<dynamic> RunQueryInMySql(string[] sqlTexts)
|
||||
{
|
||||
var settings = _services.GetRequiredService<SqlDriverSetting>();
|
||||
using var connection = new MySqlConnection(settings.MySqlExecutionConnectionString);
|
||||
using var connection = new MySqlConnection(settings.MySqlExecutionConnectionString ?? settings.MySqlConnectionString);
|
||||
return connection.Query(string.Join(";\r\n", sqlTexts));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue