diff --git a/apps/www/_blog/2022-09-08-choosing-a-postgres-primary-key.mdx b/apps/www/_blog/2022-09-08-choosing-a-postgres-primary-key.mdx index 6fa24cafbc4..7b96861b886 100644 --- a/apps/www/_blog/2022-09-08-choosing-a-postgres-primary-key.mdx +++ b/apps/www/_blog/2022-09-08-choosing-a-postgres-primary-key.mdx @@ -164,9 +164,9 @@ So how does *this* work? Postgres does the same thing under the covers -- it gen Let's say the application using the DB has some [Python](https://python.org) code like the following: -```sql -import randrange from random -import User from models; +```python +from random import randrange +from models import User MAX_RANDOM_USER_ID = 1_000_000_000 def create_user(): """ @@ -175,7 +175,6 @@ def create_user(): user_id = randrange(1, MAX_RANDOM_USER_ID) user = User(id=user_id, email="new@example.com", name="new user") db.save(user) - ``` That *looks* good, but there's a problem -- [random](https://docs.python.org/3/library/random.html) is a *pseudorandom* generator. @@ -348,7 +347,7 @@ Unfortunately, `uuid-ossp` isn't *quite* so advanced as to have many of these ne [pg_idkit](https://github.com/t3hmrman/pg_idkit) is built with Rust, so it gives us access to the following ID generation crates: -- [nanoid](https://crates.io/crates/nanoid) (a [well known package](https://www.npmjs.com/package/nanoid) from the the NodeJS ecosystem) +- [nanoid](https://crates.io/crates/nanoid) (a [well known package](https://www.npmjs.com/package/nanoid) from the NodeJS ecosystem) - [ksuid](https://crates.io/crates/ksuid) - [ulid](https://crates.io/crates/ulid) - [rs-snowflake](https://crates.io/crates/rs-snowflake) (Twitter's Snowflake algorithm) diff --git a/apps/www/_blog/2022-10-03-postgres-wasm.mdx b/apps/www/_blog/2022-10-03-postgres-wasm.mdx index d3108c92b04..fc8a139b2ca 100644 --- a/apps/www/_blog/2022-10-03-postgres-wasm.mdx +++ b/apps/www/_blog/2022-10-03-postgres-wasm.mdx @@ -79,7 +79,7 @@ It has a lot of potential though. Some ideas we'll be playing with over the next - **Documentation:** for tutorials and demos. - **Offline data:** running it in the browser for an offline cache, similar to [sql.js](https://sql.js.org/#/) or [absurd-sql](https://github.com/jlongster/absurd-sql). - **Offline data analysis:** using it in a dashboard for offline data analysis and charts. -- **Testing:** testing PostgresSQL functions, triggers, data modeling, logical replication, etc. +- **Testing:** testing PostgreSQL functions, triggers, data modeling, logical replication, etc. - **Dev environments:** use it as a development environment — pull data from production or push new data, functions, triggers, views up to production. - **Snapshots:** create a test version of your database with sample data, then take a snapshot to send to other developers. - **Support:** send snapshots of your database to support personnel to demonstrate an issue you're having. @@ -97,7 +97,7 @@ See [source code](https://github.com/snaplet/postgres-browser/tree/main/packages ### Web application -Next, we need to run the the VM inside our browser. How? [WASM](https://en.wikipedia.org/wiki/WebAssembly). +Next, we need to run the VM inside our browser. How? [WASM](https://en.wikipedia.org/wiki/WebAssembly). We use [v86](https://github.com/copy/v86) to run our VM inside the browser. Our demo application is very simple - plain HTML and some basic styling. See [source code](https://github.com/snaplet/postgres-browser/tree/main/packages/pg-browser). @@ -147,7 +147,7 @@ We achieve this by mounting a compressed [9P filesystem]( Some more context around Typesense's behavior: how loose or exact matches are done are configurable in Typesense. For eg, you can configure the number of typos that are accounted for (num_typos), and when typo tolerance should kick-in, only if a configurable amount of results are not found (typo_tokens_treshold). For multi keyword searches, you can configure Typesense to expand the search by dropping some of the keywords, until at least a configurable number of search results are found (drop_tokens_threshold). +> Some more context around Typesense's behavior: how loose or exact matches are done are configurable in Typesense. For eg, you can configure the number of typos that are accounted for (num_typos), and when typo tolerance should kick-in, only if a configurable amount of results are not found (typo_tokens_threshold). For multi keyword searches, you can configure Typesense to expand the search by dropping some of the keywords, until at least a configurable number of search results are found (drop_tokens_threshold). > We've chosen specifically to keep the search tight because we received feedback from users that some results were confusing if we let the defaults be too loose. _Jason Bosco, Typesense CEO_ diff --git a/apps/www/_blog/2022-11-02-supabase-beta-update-october-2022.mdx b/apps/www/_blog/2022-11-02-supabase-beta-update-october-2022.mdx index 3b575fcab3d..f0ae6d632ca 100644 --- a/apps/www/_blog/2022-11-02-supabase-beta-update-october-2022.mdx +++ b/apps/www/_blog/2022-11-02-supabase-beta-update-october-2022.mdx @@ -43,7 +43,7 @@ The Auth team published an in-depth doc explaining how Supabase Auth supports se ![Database Testing with pgTAP](/images/blog/2022-october/database-testing-postgres-pgtap.jpg) -Do you have 100% code coverage? Probably not, because that’s usually the last thing you think of, but *definitely* not if you don’t have database tests. We just shipped a framework for Database Tests which makes it incredibly easy to test your database using pgTAP an pg_prove. +Do you have 100% code coverage? Probably not, because that’s usually the last thing you think of, but *definitely* not if you don’t have database tests. We just shipped a framework for Database Tests which makes it incredibly easy to test your database using pgTAP and pg_prove. [Read the docs](https://supabase.com/docs/guides/database/testing). @@ -96,7 +96,7 @@ If you want to see +100 other apps, check [the replies](https://twitter.com/supa ## Launch Week 6 date announced -We are ending 2022 on a high note ✊. Mark your calendars: Launch Week 6 is happenning on **December 12-16**. +We are ending 2022 on a high note ✊. Mark your calendars: Launch Week 6 is happening on **December 12-16**. In the meantime, [revisit LW5](https://supabase.com/launch-week).