YelloJello
10/10/2021, 5:38 PMNine
10/11/2021, 2:15 PMsudo killall windows
10/11/2021, 3:55 PMNine
10/11/2021, 3:56 PMsudo killall windows
10/11/2021, 3:57 PMNine
10/11/2021, 3:58 PMNine
10/11/2021, 3:58 PMsudo killall windows
10/11/2021, 3:59 PMNine
10/11/2021, 5:51 PMcdedreuille
10/11/2021, 5:53 PMHarryET
10/11/2021, 6:27 PMcopple
10/11/2021, 6:52 PMcopple
10/11/2021, 6:54 PMrmontgomery429
10/11/2021, 10:43 PMrmontgomery429
10/11/2021, 10:58 PMjonny
10/12/2021, 12:02 AMBiondi Bagasta Wiko Putra
10/12/2021, 2:42 AMts
filter('title', 'author', 'eq', `${data}`))
This code was throwing an error : Expected 3 arguments but found 4`
.khacvy
10/12/2021, 2:50 AM.or(title.eq.your_title,author.eq.your_title')
Biondi Bagasta Wiko Putra
10/12/2021, 2:52 AMLeoSonnekus
10/12/2021, 2:53 AMLuki
10/12/2021, 3:29 AMjavascript
[
{
name: 'Example',
id: 1,
attributes: [
{
color: 'red',
id: 1
}
]
},
{
name: 'Example 2',
id: 2,
attributes: [
{
color: 'green',
id: 19
},
{
color: 'gray',
id: 23
},
]
}
]
How can a get, for example, all the products where its attributes contain id == 1, something like this:
javascript
supabase
.from('products')
.select('*')
.where('attribute_item')
.contains('id', 1)
khacvy
10/12/2021, 4:07 AMattributes
? I think if attributes
is just an array of id and color, I suggest you use jsonb
data type. Then you can use query to select specific attributes
.Biondi Bagasta Wiko Putra
10/12/2021, 4:08 AMts
.select(` id, title, author, publishedDate, image,category:categoryId (name), publisher:publisherId (name)`).contains('author', ['Bee']))
But it was throwing an error :
Object { hint: "No operator matches the given name and argument types. You might need to add explicit type casts.", message: "operator does not exist: character varying @> unknown", code: "42883", details: null }
Biondi Bagasta Wiko Putra
10/12/2021, 4:08 AMBiondi Bagasta Wiko Putra
10/12/2021, 4:35 AMNine
10/12/2021, 6:15 AMHal
10/12/2021, 10:31 AMHal
10/12/2021, 10:42 AMjon.m
10/12/2021, 6:44 PMsilentworks
10/12/2021, 10:55 PM