Update TDengine

This commit is contained in:
sunkaixuan 2025-02-26 20:21:10 +08:00
parent c8e2b7aab9
commit 5298914676

View File

@ -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>();