Industrial
10/26/2018, 10:05 AMwhere
clause only contains an id
property. How can I use the same query for inserting and for updating data?huv1k
10/26/2018, 10:06 AMcreate
if you provide id then is update
executedIndustrial
10/26/2018, 10:06 AMIndustrial
10/26/2018, 10:13 AMIndustrial
10/26/2018, 10:24 AMhuv1k
10/26/2018, 12:24 PMhuv1k
10/26/2018, 12:24 PMIndustrial
10/26/2018, 2:50 PMIndustrial
10/26/2018, 2:52 PMIndustrial
10/26/2018, 2:53 PMIndustrial
10/26/2018, 2:54 PMhuv1k
10/26/2018, 2:54 PMhuv1k
10/26/2018, 2:55 PMIndustrial
10/26/2018, 2:55 PM{ base: 'BTC', quote: 'ETH', active: true }
Industrial
10/26/2018, 2:56 PMIndustrial
10/26/2018, 2:56 PMfindMarket(where: { base: $base, quote: $quote})
Industrial
10/26/2018, 2:57 PMupdateMarket()
or createMarket()
Industrial
10/26/2018, 2:57 PMhuv1k
10/26/2018, 2:57 PMIndustrial
10/26/2018, 2:57 PMhuv1k
10/26/2018, 2:59 PMIndustrial
10/26/2018, 3:00 PMIndustrial
10/26/2018, 3:00 PMIndustrial
10/26/2018, 3:01 PMMarketWhereUniqueInput
Industrial
10/26/2018, 3:03 PMIndustrial
10/26/2018, 3:08 PMArnab
10/29/2018, 8:21 AMwhere
assumes that you are filtering on a unique field (in the table). It is not the same as WHERE
in SQL (which can filter on non-unique column values)