Ejemplo n.º 1
0
 /// <summary>
 /// 获取decimal值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static decimal ToDecimal(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Util.Helpers.Convert.ToDecimal(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取日期值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static DateTime ToDate(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Util.Helpers.Convert.ToDate(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 获取可空整型值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static int?ToIntOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToIntOrNull(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 获取可空整型值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static int?ToIntOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Ding.Helpers.Convert.ToIntOrNull(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 获取可空float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static decimal?ToDecimalOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToDecimalOrNull(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 6
0
 /// <summary>
 /// 获取可空日期值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static DateTime?ToDateOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToDateOrNull(sqlQuery.ToScalar(connection)));
 }
 /// <summary>
 /// 获取日期值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static DateTime ToDate(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToDate(sqlQuery.ToScalar(connection));
Ejemplo n.º 8
0
 /// <summary>
 /// 获取double值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static double ToDouble(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToDouble(sqlQuery.ToScalar(connection)));
 }
 /// <summary>
 /// 获取decimal值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static decimal ToDecimal(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToDecimal(sqlQuery.ToScalar(connection));
 /// <summary>
 /// 获取可空布尔值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static bool?ToBoolOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToBoolOrNull(sqlQuery.ToScalar(connection));
 /// <summary>
 /// 获取可空float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static double?ToDoubleOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToDoubleOrNull(sqlQuery.ToScalar(connection));
Ejemplo n.º 12
0
 /// <summary>
 /// 获取可空布尔值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static bool?ToBoolOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Core.Helpers.Convert.ToBoolOrNull(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 13
0
 /// <summary>
 /// 获取float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static float ToFloat(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Ding.Helpers.Convert.ToFloat(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 14
0
 /// <summary>
 /// 获取Guid值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static Guid ToGuid(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Util.Helpers.Convert.ToGuid(sqlQuery.ToScalar(connection)));
 }
 /// <summary>
 /// 获取可空Guid值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static Guid?ToGuidOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToGuidOrNull(sqlQuery.ToScalar(connection));
Ejemplo n.º 16
0
 /// <summary>
 /// 获取可空float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static float?ToFloatOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Util.Helpers.Convert.ToFloatOrNull(sqlQuery.ToScalar(connection)));
 }
 /// <summary>
 /// 获取整型值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static int ToInt(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToInt(sqlQuery.ToScalar(connection));
Ejemplo n.º 18
0
 /// <summary>
 /// 获取字符串值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static string ToString(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(sqlQuery.ToScalar(connection).SafeString());
 }
 /// <summary>
 /// 获取可空float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static float?ToFloatOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null) => Conv.ToFloatOrNull(sqlQuery.ToScalar(connection));
Ejemplo n.º 20
0
 /// <summary>
 /// 获取布尔值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static bool ToBool(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToBool(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 21
0
 /// <summary>
 /// 获取整型值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static int ToInt(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Convert.ToInt(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 22
0
 /// <summary>
 /// 获取Guid值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static Guid ToGuid(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToGuid(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 23
0
 /// <summary>
 /// 获取可空Guid值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static Guid?ToGuidOrNull(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Convert.ToGuidOrNull(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 24
0
 /// <summary>
 /// 获取float值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 /// <returns></returns>
 public static float ToFloat(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Conv.ToFloat(sqlQuery.ToScalar(connection)));
 }
Ejemplo n.º 25
0
 /// <summary>
 /// 获取double值
 /// </summary>
 /// <param name="sqlQuery">Sql查询对象</param>
 /// <param name="connection">数据库连接</param>
 public static double ToDouble(this ISqlQuery sqlQuery, IDbConnection connection = null)
 {
     return(Ding.Helpers.Convert.ToDouble(sqlQuery.ToScalar(connection)));
 }