主要更新了http相关的内容

This commit is contained in:
2025-11-18 19:54:13 +08:00
parent bf464b04a6
commit 5762b6daf4
13 changed files with 155 additions and 136 deletions

View File

@@ -1,10 +1,4 @@
using Neo4j.Driver;
using NPOI;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
namespace Ramitta
{
@@ -58,7 +52,8 @@ namespace Ramitta
string nodeType2, Dictionary<string, string> nodeProperties2, // 使用字典替代单独的参数
ArrowDirection arrow = ArrowDirection.Right,
Dictionary<string, string> relationshipProperties = null // 可选字典参数
){
)
{
using (var session = _driver.AsyncSession())
{
// 构建查询的 MATCH 部分,动态地使用字典中的键值对来构造节点的属性
@@ -97,7 +92,7 @@ namespace Ramitta
// await neo4jService.GetRelatedNodesAsync("文件", properties);
public async Task<List<Dictionary<string, string>>> GetRelatedNodesAsync(
string nodeLabel,
Dictionary<string, string>? nodeProperties=null)
Dictionary<string, string>? nodeProperties = null)
{
string query;
if (nodeProperties == null)

View File

@@ -1,10 +1,5 @@
using Npgsql;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ramitta
{
@@ -145,7 +140,7 @@ namespace Ramitta
{
for (int i = 0; i < queries.Count; i++)
{
using (var cmd = new NpgsqlCommand(queries[i], conn, (NpgsqlTransaction)transaction))
using (var cmd = new NpgsqlCommand(queries[i], conn, transaction))
{
var parameters = parametersList[i];
if (parameters != null)

View File

@@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data;
using System.Data.SQLite;
namespace Ramitta