Exemplo n.º 1
0
 internal static IEnumerable <HDTransactionData> GetAllTransactions(DBConnection conn, int walletId, int?accountIndex, int?addressType, int?addressIndex, int limit = int.MaxValue, HDTransactionData prev = null, bool descending = true)
 {
     return(conn.Query <HDTransactionData>($@"
         SELECT  *
         FROM    HDTransactionData
         WHERE   WalletId = {walletId} {((accountIndex == null) ? $@"
         AND     AccountIndex IN (SELECT AccountIndex FROM HDAccount WHERE WalletId = {walletId})" : $@"
         AND     AccountIndex = {accountIndex}")} {((addressType == null) ? $@"
Exemplo n.º 2
0
        internal static IEnumerable <HDTransactionData> GetAllTransactions(DBConnection conn, int walletId, int?accountIndex, int?addressType, int?addressIndex, int limit = int.MaxValue, HDTransactionData prev = null, bool descending = true)
        {
            string strWalletId     = DBParameter.Create(walletId);
            string strAccountIndex = DBParameter.Create(accountIndex);
            string strAddressType  = DBParameter.Create(addressType);
            string strAddressIndex = DBParameter.Create(addressIndex);
            string strLimit        = DBParameter.Create(limit);
            string strPrevTime     = DBParameter.Create(prev?.OutputTxTime);
            string strPrevIndex    = DBParameter.Create(prev?.OutputIndex);

            return(conn.Query <HDTransactionData>($@"
                SELECT  *
                FROM    HDTransactionData
                WHERE   WalletId = {strWalletId} {((accountIndex == null) ? $@"
                AND     AccountIndex IN (SELECT AccountIndex FROM HDAccount WHERE WalletId = {strWalletId})" : $@"
                AND     AccountIndex = {strAccountIndex}")} {((addressType == null) ? $@"