From 47cbf5b4a9f13e6b1cb686d5a987e5b4048c4a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=9C=E7=B3=96=E7=BD=91?= <610262374@qq.com> Date: Wed, 24 Nov 2021 09:45:56 +0800 Subject: [PATCH 1/3] Update README.md --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 62162c173..93128b5a4 100644 --- a/README.md +++ b/README.md @@ -192,3 +192,26 @@ Split query .SplitTable(DateTime.Now.Date.AddYears(-1), DateTime.Now) .ToPageList(1,2);  ``` + +### Feature9: Big data insert or update +```cs +//Insert A million only takes a few seconds +db.Fastest().BulkCopy(GetList());//性能 比现有任何Bulkcopy都要快30% + + +//uupdate A million only takes a few seconds +db.Fastest().BulkUpdate(GetList());//A million only takes a few seconds完 +db.Fastest().BulkUpdate(GetList(),new string[]{"id"},new string[]{"name","time"})//无主键用法 + +//if exists update, else insert + var x= db.Storageable(data).ToStorage(); + x.BulkCopy(); + x.BulkUpdate(); + +//set table name +db.Fastest().AS("tableName").BulkCopy(GetList()) + +//set page +db.Fastest().PageSize(300000).BulkCopy(insertObjs); + +``` From 480c631d8a152aa833249f764b22d30ef5807463 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=9C=E7=B3=96=E7=BD=91?= <610262374@qq.com> Date: Wed, 24 Nov 2021 09:46:39 +0800 Subject: [PATCH 2/3] Update README.md --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 93128b5a4..07ccbc3fc 100644 --- a/README.md +++ b/README.md @@ -196,12 +196,12 @@ Split query ### Feature9: Big data insert or update ```cs //Insert A million only takes a few seconds -db.Fastest().BulkCopy(GetList());//性能 比现有任何Bulkcopy都要快30% +db.Fastest().BulkCopy(GetList()); //uupdate A million only takes a few seconds db.Fastest().BulkUpdate(GetList());//A million only takes a few seconds完 -db.Fastest().BulkUpdate(GetList(),new string[]{"id"},new string[]{"name","time"})//无主键用法 +db.Fastest().BulkUpdate(GetList(),new string[]{"id"},new string[]{"name","time"})//no primary key //if exists update, else insert var x= db.Storageable(data).ToStorage(); From a3befddbaf8a85fe9c7eef5fd27dfd08369d6839 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=9C=E7=B3=96=E7=BD=91?= <610262374@qq.com> Date: Wed, 24 Nov 2021 09:56:03 +0800 Subject: [PATCH 3/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 07ccbc3fc..d79ed64bf 100644 --- a/README.md +++ b/README.md @@ -199,7 +199,7 @@ Split query db.Fastest().BulkCopy(GetList()); -//uupdate A million only takes a few seconds +//update A million only takes a few seconds db.Fastest().BulkUpdate(GetList());//A million only takes a few seconds完 db.Fastest().BulkUpdate(GetList(),new string[]{"id"},new string[]{"name","time"})//no primary key