mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-04-05 17:37:58 +08:00
Update TDengine
This commit is contained in:
parent
c8e2b7aab9
commit
5298914676
@ -1,13 +1,27 @@
|
||||
using SqlSugar.TDengine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
|
||||
namespace SqlSugar
|
||||
{
|
||||
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)
|
||||
{
|
||||
STableAttribute sTableAttribute = typeof(T).GetCustomAttribute<STableAttribute>();
|
||||
|
Loading…
Reference in New Issue
Block a user