mirror of
https://github.com/composewell/streamly.git
synced 2024-09-11 11:37:22 +03:00
Compare with custom store
This commit is contained in:
parent
921c4ce14d
commit
5e7ec4330c
@ -84,6 +84,11 @@ import Data.Store.TH
|
||||
import Data.Store (Store)
|
||||
import qualified Data.Store as Store
|
||||
|
||||
import qualified Streamly.Internal.Data.Serialize.RecordTH as RecordTH
|
||||
|
||||
import qualified Data.Store.TH.JInternal as JInternal
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- Types
|
||||
-------------------------------------------------------------------------------
|
||||
@ -838,43 +843,43 @@ instance Arbitrary TxnInfo where
|
||||
|
||||
data Transaction = Transaction
|
||||
{ _id :: !Text
|
||||
, _payerVpa :: !(Maybe Text)
|
||||
, _payerVpaHash :: !(Maybe Text)
|
||||
, _payeeVpa :: !(Maybe Text)
|
||||
, _payeeVpaHash :: !(Maybe Text)
|
||||
, _payerInfo :: !(Maybe PayerInfo)
|
||||
, _payeeInfo :: !(Maybe PayeeInfo)
|
||||
, _txnInfo :: !(Maybe TxnInfo)
|
||||
, _selfInitiated :: !(Maybe Bool)
|
||||
, _mode :: !TransactionMode
|
||||
, _amount :: !Double
|
||||
, _upiRequestId :: !Text
|
||||
, __type :: !TransactionType
|
||||
, _status :: !TransactionStatus
|
||||
, _upiMsgId :: !(Maybe Text)
|
||||
, _npciResponse :: !(Maybe NpciResponse)
|
||||
, _remarks :: !Text
|
||||
, _myval :: !(Maybe Text)
|
||||
, _amount :: !Double
|
||||
, _expiry :: !(Maybe LocalTime)
|
||||
, _status :: !TransactionStatus
|
||||
, _channel :: !(Maybe TransactionChannel)
|
||||
, _purpose :: !(Maybe Text)
|
||||
, _remarks :: !Text
|
||||
, _txnInfo :: !(Maybe TxnInfo)
|
||||
, _currency :: !Text
|
||||
, _upiResponseId :: !(Maybe Text)
|
||||
, _payeeVpa :: !(Maybe Text)
|
||||
, _payerVpa :: !(Maybe Text)
|
||||
, _upiMsgId :: !(Maybe Text)
|
||||
, _createdAt :: !LocalTime
|
||||
, _payeeInfo :: !(Maybe PayeeInfo)
|
||||
, _payerInfo :: !(Maybe PayerInfo)
|
||||
, _seqNumber :: !(Maybe Int)
|
||||
, _updatedAt :: !LocalTime
|
||||
, __MandateId :: !(Maybe Text)
|
||||
, __CustomerId :: !(Maybe Text)
|
||||
, __MerchantId :: !(Maybe Text)
|
||||
, __MerchantCustomerId :: !(Maybe Text)
|
||||
, _channel :: !(Maybe TransactionChannel)
|
||||
, _callbackSent :: !(Maybe Bool)
|
||||
, _callbackStatus :: !(Maybe TransactionCallbackStatus)
|
||||
, _completedAt :: !(Maybe LocalTime)
|
||||
, _callbackSent :: !(Maybe Bool)
|
||||
, _npciResponse :: !(Maybe NpciResponse)
|
||||
, _payeeVpaHash :: !(Maybe Text)
|
||||
, _payerVpaHash :: !(Maybe Text)
|
||||
, _upiRequestId :: !Text
|
||||
, _selfInitiated :: !(Maybe Bool)
|
||||
, _upiResponseId :: !(Maybe Text)
|
||||
, _callbackStatus :: !(Maybe TransactionCallbackStatus)
|
||||
, _initiationMode :: !(Maybe Text)
|
||||
, _purpose :: !(Maybe Text)
|
||||
, __MandateId :: !(Maybe Text)
|
||||
, _seqNumber :: !(Maybe Int)
|
||||
, _createdAt :: !LocalTime
|
||||
, _updatedAt :: !LocalTime
|
||||
, _myval :: !(Maybe Text)
|
||||
, __MerchantCustomerId :: !(Maybe Text)
|
||||
} deriving (Generic, Show, Eq)
|
||||
|
||||
$(deriveSerialize ''Transaction)
|
||||
$(makeStore ''Transaction)
|
||||
$(RecordTH.deriveSerialize ''Transaction)
|
||||
$(JInternal.makeJStore ''Transaction)
|
||||
|
||||
instance Arbitrary Transaction where
|
||||
arbitrary =
|
||||
|
@ -3,3 +3,10 @@ packages: streamly.cabal
|
||||
, test/streamly-tests.cabal
|
||||
, benchmark/streamly-benchmarks.cabal
|
||||
, docs/streamly-docs.cabal
|
||||
|
||||
-- source-repository-package
|
||||
-- type: git
|
||||
-- location: https://github.com/neeraj97/store.git
|
||||
-- tag: d5af8e8324a72ef29900f57ff2dc3a7f5b834a73
|
||||
|
||||
write-ghc-environment-files: always
|
@ -304,6 +304,7 @@ library
|
||||
, Streamly.Internal.Data.Unbox.TH
|
||||
, Streamly.Internal.Data.Serialize.TH
|
||||
, Streamly.Internal.Data.Serialize.RecordTH
|
||||
, Streamly.Internal.Data.Serialize.JInternal
|
||||
|
||||
-- Unboxed IORef
|
||||
, Streamly.Internal.Data.IORef.Unboxed
|
||||
@ -465,6 +466,12 @@ library
|
||||
-- XXX to be removed
|
||||
, containers >= 0.6.0 && < 0.7
|
||||
, heaps >= 0.3 && < 0.5
|
||||
|
||||
, bytestring
|
||||
, text
|
||||
, store
|
||||
, th-utilities
|
||||
, store-core
|
||||
if !flag(use-unliftio)
|
||||
build-depends: monad-control >= 1.0 && < 1.1
|
||||
|
||||
|
16
default.nix
16
default.nix
@ -56,14 +56,14 @@ let haskellPackages =
|
||||
streamly-docs =
|
||||
mkPackage super "streamly-docs"
|
||||
./docs flags inShell;
|
||||
|
||||
#fusion-plugin =
|
||||
# super.callHackageDirect
|
||||
# { pkg = "fusion-plugin";
|
||||
# ver = "0.2.3";
|
||||
# sha256 = "073wbhdxj1sh5160blaihbzkkhabs8s71pqhag16lvmgbb7a3hla";
|
||||
# } {};
|
||||
|
||||
/*
|
||||
store =
|
||||
let src = fetchGit {
|
||||
url = "https://github.com/neeraj97/store.git";
|
||||
rev = "d5af8e8324a72ef29900f57ff2dc3a7f5b834a73";
|
||||
ref = "support-for-backward-compatibility-fieldname";
|
||||
}; in super.callCabal2nix "store" "${src}" {};
|
||||
*/
|
||||
lockfree-queue =
|
||||
super.callHackageDirect
|
||||
{ pkg = "lockfree-queue";
|
||||
|
Loading…
Reference in New Issue
Block a user