-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
增加sqlite支持
- Loading branch information
Showing
23 changed files
with
277 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
-- ---------------------------- | ||
-- Table structure for school | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS School; | ||
CREATE TABLE School ( | ||
Id CHAR(32) PRIMARY KEY | ||
NOT NULL, | ||
Name VARCHAR (255) | ||
); | ||
|
||
-- ---------------------------- | ||
-- Table structure for student | ||
-- ---------------------------- | ||
DROP TABLE IF EXISTS Student; | ||
CREATE TABLE Student ( | ||
Id CHAR(32) NOT NULL | ||
PRIMARY KEY, | ||
Name VARCHAR (255), | ||
Age INT, | ||
Birthday DATETIME, | ||
SchoolId CHAR (32) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Leo.Chimp.DapperAdapter | ||
{ | ||
public class SqliteAdapter : ISqlAdapter | ||
{ | ||
public virtual string PagingBuild(ref PartedSql partedSql, object args, long skip, long take) | ||
{ | ||
var pageSql = $"{partedSql.Raw} LIMIT {take} OFFSET {skip}"; | ||
return pageSql; | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,7 +19,8 @@ public class KingOptions | |
public enum DbType | ||
{ | ||
MSSQL, | ||
MYSQL | ||
MYSQL, | ||
SQLITE | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
<PackageProjectUrl>https://github.com/longxianghui/chimp</PackageProjectUrl> | ||
<TargetFramework>netstandard2.1</TargetFramework> | ||
<PackageProjectUrl>https://github.com/luodaoyi/chimp</PackageProjectUrl> | ||
<LangVersion>7.3</LangVersion> | ||
<Version>2.1.2</Version> | ||
<Authors>longxianghui</Authors> | ||
<Version>3.0.0</Version> | ||
<Authors>luodaoyi</Authors> | ||
<Description>ef and dapper repository.</Description> | ||
<PackageTags>repository;unit of work;ef;dapper;</PackageTags> | ||
<RepositoryUrl>https://github.com/longxianghui/chimp</RepositoryUrl> | ||
<RepositoryUrl>https://github.com/luodaoyi/chimp</RepositoryUrl> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Dapper" Version="2.0.30" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="2.1.11" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="2.1.11" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="2.1.0" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="2.1.4" /> | ||
<PackageReference Include="Dapper" Version="2.0.35" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.7" /> | ||
<PackageReference Include="Microsoft.Extensions.DependencyModel" Version="3.1.6" /> | ||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.