anindosarker
02/12/2023, 10:23 AMbrassotron
02/12/2023, 11:10 AMretval
contains headers as type http_header[]
which is a tuple as described by the documentation https://github.com/pramsey/pgsql-http:
> The headers field for requests and response is a PostgreSQL array of type http_header which is just a simple tuple.
The MailerSend API request to send an email returns an empty response with a 202 status and a response header with key x-message-id
containing a uuid of the message in MailerSend's API.
I need to get this from the headers stored in retval, but I can't seem to figure out how without getting type interchangeability errors?
sql
-- this is executed by a trigger after insert on public.emails
select into retval * from http(...);
update public.emails set message_id = ... where id = new.id;
I'm trying to effectively get the value of retval->'headers'->>['x-message-id']
.
Thanks for any help!Shelby
02/12/2023, 11:37 AMjfbn
02/12/2023, 1:32 PMJeremy Deceuster
02/12/2023, 1:33 PMoth.bio
02/12/2023, 1:37 PMsupabase eject
function online, but it was apparently scrapped. How can I proceed? Thanks!水瓶座ーcindrmon
02/12/2023, 1:42 PMedgaras
02/12/2023, 2:17 PMjs
const { data, error } = await supabaseAdmin
.from('jobs')
.select(`*,
job_filters!jobs_job_filters(*)
`)
.eq('job_filters.slug', 'freelance')
.eq('job_status', 'LIVE')
This is what I am trying to achieve but seem like the .eq('job_filters.slug', 'freelance')
part doesn't' work. Any ideas?Erdi
02/12/2023, 2:37 PMrwbcards
02/12/2023, 3:08 PMDevilsBlade0
02/12/2023, 3:34 PMak4zh
02/12/2023, 4:23 PMkugi
02/12/2023, 4:49 PMsubvertallchris
02/12/2023, 4:54 PMkaze
02/12/2023, 5:03 PMShelby
02/12/2023, 6:51 PMSarcodo
02/12/2023, 7:33 PMnpx supabase start
so I can see my container running and can access a local DB however that local DB doesn't have any tables which I wanted to get from my prod db.oth.bio
02/12/2023, 7:44 PMstefanVDW
02/12/2023, 8:43 PMsupabase db remote commit
command in a project which I just initialised (it was an existing project but I deleted the supabase folder and ran everything agains starting from supabase init
), I expect the 7 remote changes to be applied to my local development environment.
Instead I get the following error:
Error: The remote database's migration history is not in sync with the contents of supabase/migrations. Resolve this by:
- Updating the project from version control to get the latest supabase/migrations,
- Pushing unapplied migrations with supabase db push,
- Or failing that, manually editing supabase_migrations.schema_migrations table with supabase migration repair.
I was under te impression that when you have an empty /migrations folder (or no migrations folder), the remote migrations will be applied.
Running the supabase migration list command shows the expected migrations:
LOCAL │ REMOTE │ TIME (UTC)
────────┼────────────────┼──────────────────────
│ 20221015154708 │ 2022-10-15 15:47:08
│ 20221018164830 │ 2022-10-18 16:48:30
│ 20230105123901 │ 2023-01-05 12:39:01
│ 20230105125254 │ 2023-01-05 12:52:54
│ 20230107120832 │ 2023-01-07 12:08:32
│ 20230107124039 │ 2023-01-07 12:40:39
│ 20230211161612 │ 2023-02-11 16:16:12
Is there an extra step needed in order to get my (empty) local development environment back in sync with my remote one? I tried the suggested commands in the error message but no luck so far.
Thanks!AlanK
02/12/2023, 9:26 PMmohnish
02/12/2023, 9:59 PMICAZ117
02/12/2023, 10:53 PMjs
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: NotFound: The system cannot find the path specified. (os error 3)
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)
Hypersigils
02/12/2023, 11:02 PMUncaught (in promise) TypeError: supabase.auth.getSession is not a function
This is after pulling a project from github that worked on another machine.
Here's a screenshot of the supabase.auth object I'm calling getSession()
on:
https://i.imgur.com/m2z2fkC.png▾
"dependencies": {
"@mdi/font": "5.9.55",
"@supabase/supabase-js": "^2.7.1",
"pinia": "^2.0.30",
"roboto-fontface": "*",
"vue": "^3.2.45",
"vue-router": "4",
"vue-supabase": "^2.3.0",
"vuetify": "^3.0.0-beta.0",
"webfontloader": "^1.0.0"
},
Here's my import.
import { createClient } from '@supabase/supabase-js'
const supabase = createClient(
"-------------------------",
"-------------------------"
);
export default supabase;
Thank you in advance!Domcario
02/13/2023, 12:33 AMjsonb
available from the dashboardTrixrabbit
02/13/2023, 12:39 AMsupabase db remote commit
my initial migration script was automatically generated. After I started supabase with supabase start
everything was created except my triggers. Is this normal ? (the trigger function was created, but not the trigger itself)sinrabo
02/13/2023, 2:16 AMICAZ117
02/13/2023, 3:13 AMjs
Error: Error bundling function: exit status 1
file:///src/import_map.json
file:///src/index.ts
error: Uncaught (in promise) Error: NotFound: The system cannot find the path specified. (os error 3)
const ret = new Error(getStringFromWasm0(arg0, arg1));
^
at __wbg_new_8d2af00bc1e329ee (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:312:19)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:79439)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1388039)
at <anonymous> (https://deno.land/x/eszip@v0.30.0/eszip_wasm_bg.wasm:1:1862894)
at __wbg_adapter_18 (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:146:6)
at real (https://deno.land/x/eszip@v0.30.0/eszip_wasm.generated.js:130:14)
dav
02/13/2023, 3:52 AMselect id from table
where property1 >= 5
and property2 = 'arbitrary string'
and property3_date <= <ARBITRARY DATE>
limit 30000
There are 1,000,000 rows in my DB. This query returns 26,000 rows. I have indices on property1, property2 and property3
Currently, it takes up to 90 seconds sometimes (median latency is ~30 seconds). I pay for the small add-on (2 GB memory)hiroshi nishio
02/13/2023, 5:10 AMsam12
02/13/2023, 7:20 AM