mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update Sqlite
This commit is contained in:
parent
4ce9c9c0cf
commit
ae90fb7618
@ -6,16 +6,18 @@ namespace SqlSugar
|
||||
{
|
||||
public class MySqlBuilder : SqlBuilderProvider
|
||||
{
|
||||
|
||||
public override string GetTranslationTableName(string name)
|
||||
{
|
||||
if (name.Contains("`")) return name;
|
||||
Check.ArgumentNullException(name, string.Format(ErrorMessage.ObjNotExist, "Table Name"));
|
||||
var context = this.Context;
|
||||
var mappingInfo = context
|
||||
.MappingTables
|
||||
.FirstOrDefault(it => it.EntityName.Equals(name, StringComparison.CurrentCultureIgnoreCase));
|
||||
return "`" + (mappingInfo == null ? name : mappingInfo.DbTableName) + "`";
|
||||
name = (mappingInfo == null ? name : mappingInfo.DbTableName);
|
||||
if (name.Contains("`"))
|
||||
return name;
|
||||
else
|
||||
return "`" + name + "`";
|
||||
}
|
||||
public override string GetTranslationColumnName(string entityName, string propertyName)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
namespace SqlSugar
|
||||
{
|
||||
public class MySqlDeleteBuilder : DeleteBuilder
|
||||
public class SqliteDeleteBuilder : DeleteBuilder
|
||||
{
|
||||
|
||||
}
|
||||
|
49
Src/Asp.Net/SqliteTest/Program.cs
Normal file
49
Src/Asp.Net/SqliteTest/Program.cs
Normal file
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq.Expressions;
|
||||
using SqlSugar;
|
||||
//using OrmTest.Models;
|
||||
//using System.Data.SqlClient;
|
||||
//using OrmTest.UnitTest;
|
||||
//using OrmTest.PerformanceTesting;
|
||||
|
||||
namespace OrmTest
|
||||
{
|
||||
class Program
|
||||
{
|
||||
static void Main(string[] args)
|
||||
{
|
||||
////// /***Unit Test***/
|
||||
//new Field(1).Init();
|
||||
//new Where(1).Init();
|
||||
//new Method(1).Init();
|
||||
//new JoinQuery(1).Init();
|
||||
//new SingleQuery(1).Init();
|
||||
//new SelectQuery(1).Init();
|
||||
//new AutoClose(1).Init();
|
||||
//new Insert(1).Init();
|
||||
//new Delete(1).Init();
|
||||
//new Update(1).Init();
|
||||
//new Mapping(1).Init();
|
||||
//new DataTest(1).Init();
|
||||
|
||||
//// /***Performance Test***/
|
||||
//// new SqlSugarPerformance(100).Select();
|
||||
|
||||
///***Demo***/
|
||||
//OrmTest.Demo.Query.Init();
|
||||
//OrmTest.Demo.Insert.Init();
|
||||
//OrmTest.Demo.Delete.Init();
|
||||
//OrmTest.Demo.Update.Init();
|
||||
//OrmTest.Demo.DbFirst.Init();
|
||||
//OrmTest.Demo.JoinSql.Init();
|
||||
//OrmTest.Demo.Filter.Init();
|
||||
//OrmTest.Demo.ComplexModel.Init();
|
||||
//OrmTest.Demo.CodeFirst.Init();
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{D48622B3-F4CD-45CD-B1C9-868083037ECD}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>SqliteTest</RootNamespace>
|
||||
<AssemblyName>SqliteTest</AssemblyName>
|
||||
@ -29,6 +29,9 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@ -41,6 +44,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Class1.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@ -54,6 +58,12 @@
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SqlSugar\SqlSugar.csproj">
|
||||
<Project>{489bb790-226c-4fad-8d1e-51d72a7ff8e5}</Project>
|
||||
<Name>SqlSugar</Name>
|
||||
</ProjectReference>
|
||||
</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.
|
||||
|
Loading…
Reference in New Issue
Block a user