internal static long Count <T>(this IDbCommand dbCmd)
        {
            SqlExpression <T> expression = OrmLiteConfig.DialectProvider.SqlExpression <T>();
            string            sql        = expression.ToCountStatement();

            return(dbCmd.Scalar <long>(sql));
        }
        internal static long Count <T>(this IDbCommand dbCmd, SqlExpression <T> expression)
        {
            string sql = expression.ToCountStatement();

            return(dbCmd.Scalar <long>(sql));
        }
Ejemplo n.º 3
0
        internal static Task <long> CountAsync <T>(this IDbCommand dbCmd, SqlExpression <T> q, CancellationToken token)
        {
            var sql = q.ToCountStatement();

            return(GetCountAsync(dbCmd, sql, q.Params, token));
        }
Ejemplo n.º 4
0
        internal static long Count <T>(this IDbCommand dbCmd, SqlExpression <T> expression)
        {
            var sql = expression.ToCountStatement();

            return(GetCount(dbCmd, sql, expression.Params));
        }
 public string ToCountStatement()
 {
     return(q.ToCountStatement());
 }