From 2733c0f7a72d24b8f3022f144f0619045a58675a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BD=98=E5=BB=BA=E4=B8=9C?= <617601767@qq.com>
Date: Sat, 16 Mar 2024 12:52:05 +0800
Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8E=92=E5=BA=8F?=
=?UTF-8?q?=E5=AE=8C=E6=88=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
Hadoop/ZKLT.Hadoop.Interface/ITableService.cs | 5 +-
Hadoop/ZKLT.Hadoop.Model/HDP_Command.cs | 4 +-
Hadoop/ZKLT.Hadoop/TableService.cs | 95 ++++++++++++-------
3 files changed, 67 insertions(+), 37 deletions(-)
diff --git a/Hadoop/ZKLT.Hadoop.Interface/ITableService.cs b/Hadoop/ZKLT.Hadoop.Interface/ITableService.cs
index 10b2a6c..ce900bf 100644
--- a/Hadoop/ZKLT.Hadoop.Interface/ITableService.cs
+++ b/Hadoop/ZKLT.Hadoop.Interface/ITableService.cs
@@ -73,7 +73,8 @@ namespace ZKLT.Hadoop.Interface
/// 条件
/// 数据
/// 结果集
- public T[] Query(HDP_Source source, HDP_Table table, Dictionary? where, Dictionary? row, Dictionary? order, string[]? col);
+ public T[] Query(HDP_Source source, HDP_Table table, Dictionary? where, Dictionary? row,
+ Dictionary? order, string[]? col);
///
/// 查询列表
@@ -84,7 +85,7 @@ namespace ZKLT.Hadoop.Interface
/// 条件
/// 数据
/// 结果集
- public HDP_Page QueryPage(HDP_Source source, HDP_Table table, int pageIndex, int pageSize, Dictionary? where, Dictionary? row, Dictionary? order, string[]? col);
+ public HDP_Page QueryPage(HDP_Source source, HDP_Table table, int pageIndex, int pageSize, Dictionary? where, Dictionary? row, Dictionary? order, string[]? col);
///
diff --git a/Hadoop/ZKLT.Hadoop.Model/HDP_Command.cs b/Hadoop/ZKLT.Hadoop.Model/HDP_Command.cs
index aa0c339..afb092c 100644
--- a/Hadoop/ZKLT.Hadoop.Model/HDP_Command.cs
+++ b/Hadoop/ZKLT.Hadoop.Model/HDP_Command.cs
@@ -27,7 +27,7 @@ namespace ZKLT.Hadoop.Model
private Dictionary? _Data;
- private Dictionary? _Order;
+ private Dictionary? _Order;
///
/// 源
@@ -62,7 +62,7 @@ namespace ZKLT.Hadoop.Model
///
/// 排序
///
- public Dictionary? Order { get => _Order; set => _Order = value; }
+ public Dictionary? Order { get => _Order; set => _Order = value; }
///
/// 命令类型
diff --git a/Hadoop/ZKLT.Hadoop/TableService.cs b/Hadoop/ZKLT.Hadoop/TableService.cs
index 676f11c..0428a5f 100644
--- a/Hadoop/ZKLT.Hadoop/TableService.cs
+++ b/Hadoop/ZKLT.Hadoop/TableService.cs
@@ -11,6 +11,7 @@ using ZKLT.Hadoop.Model;
using MySqlX.XDevAPI.Relational;
using Mysqlx.Crud;
using Newtonsoft.Json;
+using Mysqlx.Resultset;
namespace ZKLT.Hadoop
{
@@ -43,9 +44,11 @@ namespace ZKLT.Hadoop
param.Add(_column.Key!, row![_column.Key!]);
break;
case HDP_WhereType.BETWEEN:
- if (row![_column.Key!] != null) {
+ if (row![_column.Key!] != null)
+ {
var _betweendata = JsonConvert.DeserializeObject