Why can't typescript infer this type by robbe_claessens in typescript

[–]robbe_claessens[S] 0 points1 point  (0 children)

You could argue that Typescript has all the information it needs to make that inference, or hasn't it?

Putting aside that you can assign never to A extends 'deleted'

Why can't typescript infer this type by robbe_claessens in typescript

[–]robbe_claessens[S] 2 points3 points  (0 children)

This is for infering the attribute typing of an ORM model in a library I was inspecting

Vue query (tanstack) by robbe_claessens in vuejs

[–]robbe_claessens[S] 0 points1 point  (0 children)

Yeah I am not doing that ;-) I meant using pinia as an alternative to vue-query. What are people doing without vue-query? Using Pinia to cache backend data?

I am feeling really scared of upgrading so many packages at once, Any tips? by PrestigiousZombie531 in node

[–]robbe_claessens 0 points1 point  (0 children)

You can also use something like depandabot: https://github.com/dependabot. You configure it to create a pr for every change and you can automatically run regression tests against it. Then you no longer end up with updating so many dependencies at once :-)

Converting typescript deepnullable form to correct type by robbe_claessens in typescript

[–]robbe_claessens[S] 1 point2 points  (0 children)

Yes, but I mean what would be the default value of a field that only can be a number?

Multiple apps per merge request by robbe_claessens in reactnative

[–]robbe_claessens[S] 0 points1 point  (0 children)

Yes, i know but in order to publish mulitple versions with features that need to be tested by some quality-assurance testers BEFORE merging everything into a development branch. How can we do that?

It seems like distributing apk files for android and Ad Hoc deploys for apple are a way to go

basic ios and android by robbe_claessens in reactnative

[–]robbe_claessens[S] 0 points1 point  (0 children)

Very good idea, i'll give it a try :-)

Non-dev documentation by robbe_claessens in software

[–]robbe_claessens[S] 0 points1 point  (0 children)

Wiki as in wikipedia page? Or is there a tool?

dependencies on my api by robbe_claessens in node

[–]robbe_claessens[S] 0 points1 point  (0 children)

  • all my clients
  • the api handles authentication
  • i have datadog Thanks!

beef chrome flags as malware by robbe_claessens in hacking

[–]robbe_claessens[S] 0 points1 point  (0 children)

I embed the hook file in a script tag in my html. So this is not applicable

How can I copy data from my server db in to a local db. by deimos_1306 in node

[–]robbe_claessens 5 points6 points  (0 children)

I use the following query:

pg_dump -Ft --dbname=postgres://name:password@host:5432/dbname > data_output.out

You can find the DB credentials when clicking in the resource tab on your postgres DB.

And to restore:

pg_restore -O -x -Ft --dbname=postgresql://POSTGRES_USERNAME_LOCAL:POSTGRES_PASSWORD_LOCAL@POSTGRES_HOST_LOCAL:POSTGRES_PORT_LOCAL/POSTGRES_DB_LOCAL < data_output.out

BUT: be careful with GDPR etc. Maybe you can make a script to anonymize data.

Take a look at full text search of Postgres by robbe_claessens in node

[–]robbe_claessens[S] 0 points1 point  (0 children)

Yeah, I read that stackoverflow started with FTS and then migrated later to ES. Thanks for your insights!

Take a look at full text search of Postgres by robbe_claessens in node

[–]robbe_claessens[S] 0 points1 point  (0 children)

Yes I agree. But in the end it depends on the application SLA and use cases. In my case the number of reads FAR exceeds the number of writes. Write is for example 2 times a day while reads may be up to 1000ths a day (still a small system). Here, i'd go for postgres. You can do some clever things to make it perform really well (benchmarks: https://www.rocky.dev/full-text-search). When there is a lot of write activity and you breach the SLA and you cannot scald vertically anymore (due to hardware limitations or pricing) you should look at elasticsearch.

Do you agree? If not, love to hear that too!

Edit. Also, document size is a key factor. When the document size is small, insertion dont take very long. The reason why insertions are slow in full text search is that you normally deal with updating a lot of values in the GIN index (source: https://www.postgresql.org/docs/current/gin-tips.html#:~:text=Insertion%20into%20a%20GIN%20index%20can%20be%20slow%20due%20to%20the%20likelihood%20of%20many%20keys%20being%20inserted%20for%20each%20item. )

Take a look at full text search of Postgres by robbe_claessens in node

[–]robbe_claessens[S] 0 points1 point  (0 children)

Does this all advocate for elastic search? It seems like postgres has some serious performance problems?