Skip to content

Commit

Permalink
Support .NET Standard2.0, Compatible .NET Framework4.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaozhiqing.xzq committed Aug 23, 2022
1 parent 5cc7f38 commit b55ed80
Show file tree
Hide file tree
Showing 18 changed files with 1,486 additions and 1,675 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.user
*.userosscache
*.sln.docstates
.idea

packages
.DS_Store
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,14 @@
- 支持全局二级索引(GlobalIndex)
- 支持原子增

## 版本号 5.0.0 日期:2020/08/15
## 版本号 5.0.0 日期:2022/08/15
### 变更内容
- 多元索引支持统计聚合功能(Aggregation & GroupBy)
- 多元索引支持创建虚拟列、日期列
- 多元索引支持索引TTL
- 支持SQL查询

## 版本号 6.0.0 日期:2022/08/23
### 变更内容
- 支持netstandard2.0框架
- 兼容net40框架
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@
- 阿里云表格存储是构建在阿里云飞天分布式系统之上的NoSQL数据存储服务,提供海量结构化数据的存储和实时访问。

## 版本
- 当前版本:5.0.0
- 当前版本:6.0.0

## 运行环境
### Windows
- 适用于`.NET 4.0` 及以上版本
- 适用于`.NETSTANDARD2.0`及以上版本
- 适用于`Visual Studio 2010`及以上版本

## 注意事项
Expand Down
33 changes: 21 additions & 12 deletions aliyun-tablestore-csharp-sdk.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,18 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.32630.194
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk", "sdk\aliyun-tablestore-sdk.csproj", "{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-test", "test\aliyun-tablestore-sdk-test.csproj", "{F30E0874-399A-4FBD-B72B-74EE36B31AF6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk", "sdk\aliyun-tablestore-sdk.csproj", "{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-sample", "sample\aliyun-tablestore-sdk-sample.csproj", "{D151C869-BC8F-4465-9460-5103A25D21E9}"
ProjectSection(ProjectDependencies) = postProject
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B} = {AB5EFCA2-53A9-42B5-861E-3FD6F865036B}
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk-netcore-sample", "sample\aliyun-tablestore-sdk-netcore-sample.csproj", "{19084237-90AD-4BDF-B0A9-B4A51B6931DA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "aliyun-tablestore-sdk-netcore-test", "test\aliyun-tablestore-sdk-netcore-test.csproj", "{629D7B33-F623-4663-A8F1-0B9280B781FC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "internalTest", "internalTest\internalTest.csproj", "{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "aliyun-tablestore-sdk-test", "test\aliyun-tablestore-sdk-test.csproj", "{9D7540C1-72D3-496E-AB6E-29534A06C037}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand All @@ -21,18 +26,22 @@ Global
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}.Release|Any CPU.Build.0 = Release|Any CPU
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F30E0874-399A-4FBD-B72B-74EE36B31AF6}.Release|Any CPU.Build.0 = Release|Any CPU
{D151C869-BC8F-4465-9460-5103A25D21E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D151C869-BC8F-4465-9460-5103A25D21E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D151C869-BC8F-4465-9460-5103A25D21E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D151C869-BC8F-4465-9460-5103A25D21E9}.Release|Any CPU.Build.0 = Release|Any CPU
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBC62040-3F72-419D-BF9E-606DE4B8BF1E}.Release|Any CPU.Build.0 = Release|Any CPU
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Release|Any CPU.ActiveCfg = Release|Any CPU
{19084237-90AD-4BDF-B0A9-B4A51B6931DA}.Release|Any CPU.Build.0 = Release|Any CPU
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{629D7B33-F623-4663-A8F1-0B9280B781FC}.Release|Any CPU.Build.0 = Release|Any CPU
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9D7540C1-72D3-496E-AB6E-29534A06C037}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
6 changes: 0 additions & 6 deletions sample/App.config

This file was deleted.

8 changes: 4 additions & 4 deletions sample/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Aliyun.TableStore.Samples")]
[assembly: AssemblyDescription("Aliyun TableStore SDK Samples for .NET.")]
[assembly: AssemblyDescription("Aliyun TableStore SDK Samples for .NETSTANDARD2.0 and .NET40.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Alibaba Cloud Computing")]
[assembly: AssemblyProduct("Aliyun.TableStore")]
[assembly: AssemblyCopyright("Copyright (c) 2009-2016 aliyun.com")]
[assembly: AssemblyCopyright("Copyright (c) 2009-2022 aliyun.com")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("3.1.0")]
[assembly: AssemblyFileVersion("3.1.0")]
[assembly: AssemblyVersion("6.0.0")]
[assembly: AssemblyFileVersion("6.0.0")]
16 changes: 8 additions & 8 deletions sample/Samples/SearchIndexSample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -770,11 +770,11 @@ public static void GroupBy(OTSClient otsClient)
groupByGeoDistance.FieldName = Geo_type_col;
groupByGeoDistance.GroupByName = "groupByGeoDistance";
groupByGeoDistance.Origin = new GeoPoint(0, 0);
groupByGeoDistance.Ranges = new List<Range>()
groupByGeoDistance.Ranges = new List<DataModel.Search.GroupBy.Range>()
{
new Range(double.MinValue, 100.0),
new Range(100.0, 1000.0),
new Range(1000.0, double.MaxValue)
new DataModel.Search.GroupBy.Range(double.MinValue, 100.0),
new DataModel.Search.GroupBy.Range(100.0, 1000.0),
new DataModel.Search.GroupBy.Range(1000.0, double.MaxValue)
};

GroupByHistogram groupByHistogram = new GroupByHistogram();
Expand All @@ -787,11 +787,11 @@ public static void GroupBy(OTSClient otsClient)
GroupByRange groupByRange = new GroupByRange();
groupByRange.GroupByName = "groupByRange";
groupByRange.FieldName = Long_type_col;
groupByRange.Ranges = new List<Range>()
groupByRange.Ranges = new List<DataModel.Search.GroupBy.Range>()
{
new Range(0 , 5),
new Range(5,10),
new Range(10, double.MaxValue)
new DataModel.Search.GroupBy.Range(0 , 5),
new DataModel.Search.GroupBy.Range(5,10),
new DataModel.Search.GroupBy.Range(10, double.MaxValue)
};

GroupByResults results = GroupByRunner(otsClient, groupByField, groupByFilter, groupByGeoDistance, groupByHistogram, groupByRange);
Expand Down
55 changes: 55 additions & 0 deletions sample/aliyun-tablestore-sdk-netcore-sample.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
<EnableDefaultEmbeddedResourceItems>False</EnableDefaultEmbeddedResourceItems>
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>
<GenerateAssemblyDescriptionAttribute>false</GenerateAssemblyDescriptionAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<GenerateAssemblyTitleAttribute>false</GenerateAssemblyTitleAttribute>
<GenerateAssemblyVersionAttribute>false</GenerateAssemblyVersionAttribute>
<GenerateAssemblyFileVersionAttribute>false</GenerateAssemblyFileVersionAttribute>
<AppDesignerFolder>Properties</AppDesignerFolder>
<AssemblyName>Aliyun.OTS.Samples</AssemblyName>
</PropertyGroup>
<PropertyGroup>
<RootNamespace>Aliyun.OSS.Samples</RootNamespace>
<StartupObject>Aliyun.OTS.Samples.Samples.SearchIndexSample</StartupObject>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup>
<None Remove="packages.config" />
</ItemGroup>

<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Samples\AtomicIncrementSample.cs" />
<Compile Include="Samples\AutoIncrementSample.cs" />
<Compile Include="Samples\ClientInitialize.cs" />
<Compile Include="Samples\GlobalIndexSample.cs" />
<Compile Include="Samples\MultiRowReadWriteSample.cs" />
<Compile Include="Samples\ConditionUpdateSample.cs" />
<Compile Include="Samples\SearchIndexGeoSample.cs" />
<Compile Include="Samples\SearchIndexSample.cs" />
<Compile Include="Samples\SearchIndexPageSample.cs" />
<Compile Include="Samples\SingleRowReadWriteSample.cs" />
<Compile Include="Samples\CreateTableSample.cs" />
<Compile Include="Samples\SQLSample.cs" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\sdk\aliyun-tablestore-sdk.csproj" />
</ItemGroup>

</Project>
52 changes: 21 additions & 31 deletions sample/aliyun-tablestore-sdk-sample.csproj
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{D151C869-BC8F-4465-9460-5103A25D21E9}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Aliyun.OTS.Samples</RootNamespace>
<AssemblyName>Aliyun.TableStore.Sample</AssemblyName>
<AssemblyName>Aliyun.TableStore.Net40.Sample</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<TargetFrameworkProfile />
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -26,11 +23,14 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectAssetsFile>notexistfile</ProjectAssetsFile>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
Expand All @@ -49,11 +49,10 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<StartupObject>Aliyun.OTS.Samples.Program</StartupObject>
<StartupObject>Aliyun.OTS.Samples.Samples.SearchIndexSample</StartupObject>
</PropertyGroup>
<ItemGroup>
<Compile Include="Config.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Samples\AtomicIncrementSample.cs" />
<Compile Include="Samples\AutoIncrementSample.cs" />
Expand All @@ -69,34 +68,25 @@
<Compile Include="Samples\SQLSample.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\sdk\aliyun-tablestore-sdk.csproj">
<Project>{AB5EFCA2-53A9-42B5-861E-3FD6F865036B}</Project>
<Project>{ab5efca2-53a9-42b5-861e-3fd6f865036b}</Project>
<Name>aliyun-tablestore-sdk</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
2 changes: 1 addition & 1 deletion sample/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net40" />
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net40" />
</packages>
4 changes: 2 additions & 2 deletions sdk/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Aliyun.TableStore")]
[assembly: AssemblyDescription("Aliyun Table Store SDK for .NET")]
[assembly: AssemblyDescription("Aliyun Table Store SDK for .NETSTANDARD2.0 and .NET40")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Alibaba Cloud Computing")]
[assembly: AssemblyProduct("Aliyun.TableStore")]
[assembly: AssemblyCopyright("Copyright (c) 2009-2018 aliyun.com")]
[assembly: AssemblyCopyright("Copyright (c) 2009-2022 aliyun.com")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
Loading

0 comments on commit b55ed80

Please sign in to comment.