donpuerto
08/12/2021, 3:02 PMts
const deletePhoneById = async (id: number) => {
const { data, error } = await supabase
.from('phones')
.delete()
.eq('id', id)
}
jjj.westra
08/12/2021, 3:10 PM(phone.id ? phone.id : undefined)
jjj.westra
08/12/2021, 3:10 PMjjj.westra
08/12/2021, 3:10 PMuser
08/12/2021, 3:39 PMuser
08/12/2021, 3:39 PMLucho Suárez
08/12/2021, 3:41 PMconst { createClient } = require('@supabase/supabase-js')
and you're good to gouser
08/12/2021, 3:42 PM$ node-demo npm i supabase
$ node-demo node
> const { createClient } = require('@supabase/supabase-js')
Uncaught Error: Cannot find module '@supabase/supabase-js'
Require stack:
- <repl>
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:941:15)
at Function.Module._load (node:internal/modules/cjs/loader:774:27)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18) {
code: 'MODULE_NOT_FOUND',
requireStack: [ '<repl>' ]
}
Scott P
08/12/2021, 3:44 PM@supabase/supabase-js
, not just supabase
user
08/12/2021, 3:44 PMuser
08/12/2021, 3:45 PMLucho Suárez
08/12/2021, 4:01 PMperogies
08/12/2021, 4:56 PMSettings-->Project-->API-->Settings-->Extra Search Path
, but it doesn't affect anything in the UI...no endpoints are created.perogies
08/12/2021, 5:00 PMselect current_schemas(True);
?Steve
08/12/2021, 5:47 PMeyk
08/12/2021, 6:30 PMsupabaseAdmin.auth.getUserByEmail(email)
or supabaseAdmin.from("auth.users").select("id").eq("email", email)
?burggraf
08/12/2021, 7:02 PMMaus
08/12/2021, 7:06 PMsupabase/pgadmin-schema-diff
, I get the following error:
Starting schema diff...
Comparision started......0%
Traceback (most recent call last):
File "cli.py", line 272, in <module>
diff_result = message + 'BEGIN;\n\n' + '\n'.join(x.get('diff_ddl') for x in response_data['data'] if x.get('status') != 'Identical' and in_db_objects(x.get('type'), args)) + '\n\nEND;'
TypeError: 'NoneType' object is not iterable
Steve
08/12/2021, 7:37 PMMaus
08/12/2021, 8:02 PMwenbo
08/13/2021, 12:08 AMdonpuerto
08/13/2021, 1:19 AMjs
const { data, error, status } = await supabase
.from('users')
.select(`
*,
profile(*),
phones(*)
`)
.eq('id', id)
.single()
Khan W
08/13/2021, 1:28 AMjavascript
const mySubscription = supabase
.from('todos')
.on('*', payload => {
console.log('Change received!', payload)
})
.subscribe()
But if I needed to query using an ILIKE
do I need to make a custom view in postgres? Or is there a way to filter the above subscriptionSteve
08/13/2021, 1:50 AMstibbs
08/13/2021, 1:52 AMstibbs
08/13/2021, 1:53 AMdonpuerto
08/13/2021, 2:33 AMstibbs
08/13/2021, 3:03 AMfergus
08/13/2021, 3:48 AMKhan W
08/13/2021, 5:08 AMsupabase-js
library doesn’t come with a way to do that