reubence
02/17/2022, 5:31 AMconst { data, error } = await supabase
.from("company")
.update([inputFields.values])
.match([originalFields.values]);
};
This is what inputFields.values / originalFields.values look like
{
"name": "Piramal Glassed",
"email": "piramal@glass.com",
"contact": "98203"
}
garyaustin
02/17/2022, 2:24 PMconst { data, error } = await supabase
.from("company")
.update([inputFields.values])
.match([originalFields.values]);
};
This is what inputFields.values / originalFields.values look like
{
"name": "Piramal Glassed",
"email": "piramal@glass.com",
"contact": "98203"
}
garyaustin
02/17/2022, 2:26 PMreubence
02/17/2022, 2:26 PMgaryaustin
02/17/2022, 2:32 PMreubence
02/17/2022, 2:35 PMgaryaustin
02/17/2022, 2:36 PMreubence
02/17/2022, 2:36 PMconst { data, error } = await supabase
.from("company")
.update(inputFields.values)
.match(dataModal.values);
garyaustin
02/17/2022, 2:37 PMgaryaustin
02/17/2022, 2:37 PMreubence
02/17/2022, 2:38 PM{
"name": "Piramal Glasss",
"email": "piramal@glass.com",
"contact": "98203",
"address": "I - 402, Ekta Bhoomi Gardens, Rajendra Nagar, Borivali East.",
"pin": 400066,
"city": "Mumbai",
"state": "Maharashtra",
"country": "India",
"type": "Seller",
"dl_no": "8SD978F67F5G",
"pan_no": "2123SAD6780SF",
"responsible_person": "Maheshwari Gupt",
"responsible_phone": 982031,
"gstin": "CHUTIYABANAYA2153678"
}
reubence
02/17/2022, 2:38 PMreubence
02/17/2022, 2:38 PMreubence
02/17/2022, 2:41 PMupdate()
the entire row with one call right?garyaustin
02/17/2022, 2:41 PMreubence
02/17/2022, 2:42 PMgaryaustin
02/17/2022, 2:44 PMreubence
02/17/2022, 2:48 PMgaryaustin
02/17/2022, 2:50 PMreubence
02/17/2022, 2:51 PMconst { data, error } = await supabase
.from("company")
.select("*")
.eq("name", "Piramal Glass");
reubence
02/17/2022, 2:51 PMgaryaustin
02/17/2022, 2:53 PMreubence
02/17/2022, 2:54 PMgaryaustin
02/17/2022, 2:55 PMreubence
02/17/2022, 2:56 PMgaryaustin
02/17/2022, 2:56 PMgaryaustin
02/17/2022, 2:57 PMreubence
02/17/2022, 2:57 PMgaryaustin
02/17/2022, 2:58 PMreubence
02/17/2022, 2:58 PMgaryaustin
02/17/2022, 2:58 PMreubence
02/17/2022, 3:00 PMgaryaustin
02/17/2022, 3:03 PMreubence
02/17/2022, 3:03 PMreubence
02/17/2022, 3:04 PMgaryaustin
02/17/2022, 3:07 PMreubence
02/17/2022, 3:08 PMconst { data, error } = await supabase
.from("company")
.update({
name: "Piramal Glasssed",
email: "piramal@glass.come",
contact: "9820e3",
address:
"I - e402, Ekta Bhoomi Gardens, Rajendra Nagar, Borivali East.",
pin: 4000626,
city: "Mumbaei",
state: "Maharashdtra",
country: "Inddia",
type: "Seldler",
dl_no: "8SDd978F67F5G",
pan_no: "2123SdAD6780SF",
responsible_person: "Maheshwadri Gupt",
responsible_phone: 9382031,
gstin: "CHUTIYABANAYA21e53678",
})
.match({ name: "Piramal Glass" });
reubence
02/17/2022, 3:08 PMPiramal Glass
to Piramal Glassed
in the update fnreubence
02/17/2022, 3:09 PMconst { data, error } = await supabase
.from("company")
.update({
name: "Piramal Glasssed",
})
.match({ name: "Piramal Glass" });
reubence
02/17/2022, 3:09 PMgaryaustin
02/17/2022, 3:10 PMreubence
02/17/2022, 3:10 PMgaryaustin
02/17/2022, 3:11 PMreubence
02/17/2022, 3:13 PMreubence
02/17/2022, 3:14 PMinsert()
Works but update()
doesn't seem to work
const { data, error } = await supabase
.from("test")
.insert({
text: "Some Text",
text2: "Some Text 2",
})
This worked....
const { data, error } = await supabase
.from("test")
.update({
text: "Some New Text",
text2: "Some New Text 2",
})
.match({
text: "Some Text",
text2: "Some Text 2",
});
But this returns a 404 Errorreubence
02/17/2022, 3:18 PMupdate()
too is working on this new tablegaryaustin
02/17/2022, 3:21 PMgaryaustin
02/17/2022, 3:22 PMreubence
02/17/2022, 3:26 PMreubence
02/17/2022, 3:27 PMreubence
02/17/2022, 3:37 PMcreate table company (
name text,
email text,
contact text,
address text,
pin text,
city text,
states text,
country text,
typeOfCompany text,
dl_no text,
pan_no text,
responsible_person text,
responsible_phone text,
gstin text
);
And then this to insert rows
const { data, error } = await supabase.from("company").insert({
name: "Piruss",
email: "Piruss",
contact: "Piruss",
address: "Piruss",
pin: "Piruss",
city: "Piruss",
states: "Piruss",
country: "Piruss",
typeOfCompany: "Piruss",
dl_no: "Piruss",
pan_no: "Piruss",
responsible_person: "Piruss",
responsible_phone: "Piruss",
gstin: "Piruss",
});
Why is this returning me a 404 error?garyaustin
02/17/2022, 3:43 PMgaryaustin
02/17/2022, 3:45 PMreubence
02/17/2022, 3:47 PMreubence
02/17/2022, 3:47 PMgaryaustin
02/17/2022, 3:48 PMgaryaustin
02/17/2022, 3:50 PMreubence
02/17/2022, 3:54 PM