mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-08-23 13:06:50 +08:00
Update TDengine
This commit is contained in:
parent
c8e2b7aab9
commit
5298914676
@ -1,13 +1,27 @@
|
|||||||
using SqlSugar.TDengine;
|
using SqlSugar.TDengine;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace SqlSugar
|
namespace SqlSugar
|
||||||
{
|
{
|
||||||
public static class SqlSugarExtensions
|
public static class SqlSugarExtensions
|
||||||
{
|
{
|
||||||
|
public static ISugarQueryable<T> AsTDengineSTable<T>(this ISugarQueryable<T> queryable) where T:class,new()
|
||||||
|
{
|
||||||
|
var attr=SqlSugar.TDengine.UtilMethods.GetCommonSTableAttribute(queryable.Context,typeof(T).GetCustomAttribute<STableAttribute>());
|
||||||
|
queryable.AS(attr.STableName);
|
||||||
|
return queryable;
|
||||||
|
}
|
||||||
|
public static IDeleteable<T> AsTDengineSTable<T>(this IDeleteable<T> queryable) where T : class, new()
|
||||||
|
{
|
||||||
|
var attr = SqlSugar.TDengine.UtilMethods.GetCommonSTableAttribute(((DeleteableProvider<T>)queryable).Context, typeof(T).GetCustomAttribute<STableAttribute>());
|
||||||
|
queryable.AS(attr.STableName);
|
||||||
|
return queryable;
|
||||||
|
}
|
||||||
public static void MappingSTableName<T>(this ISqlSugarClient db,string newSTableName)
|
public static void MappingSTableName<T>(this ISqlSugarClient db,string newSTableName)
|
||||||
{
|
{
|
||||||
STableAttribute sTableAttribute = typeof(T).GetCustomAttribute<STableAttribute>();
|
STableAttribute sTableAttribute = typeof(T).GetCustomAttribute<STableAttribute>();
|
||||||
|
Loading…
Reference in New Issue
Block a user