File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11.prism.log
2+ .stdy.log
23.venv
34temp /
45regress /
Original file line number Diff line number Diff line change 11{
2- "." : " 0.2.0 "
2+ "." : " 0.2.1 "
33}
Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 0.2.1 (2026-04-18)
4+
5+ Full Changelog: [ v0.2.0...v0.2.1] ( https://github.com/stainless-commons/stripe-sql/compare/v0.2.0...v0.2.1 )
6+
7+ ### Chores
8+
9+ * ** internal:** support env vars in ` ./scripts/repl ` ([ e61819d] ( https://github.com/stainless-commons/stripe-sql/commit/e61819df63d91bf0f6b10ecc2abf8730b390d401 ) )
10+ * ** internal:** update gitignore ([ 69bef31] ( https://github.com/stainless-commons/stripe-sql/commit/69bef3126b1bd07a04bc674559262920b03c29ec ) )
11+ * ** internal:** update multipart form array serialization ([ f710526] ( https://github.com/stainless-commons/stripe-sql/commit/f7105265acdf5b566798f3fcf58528f1bb95b192 ) )
12+ * ** tests:** bump steady to v0.19.4 ([ 0037da0] ( https://github.com/stainless-commons/stripe-sql/commit/0037da0bb51eace12f3df31216ee2cab695b7b9a ) )
13+ * ** tests:** bump steady to v0.19.5 ([ 34e63fb] ( https://github.com/stainless-commons/stripe-sql/commit/34e63fb004f010e4fed95b3f8b357c4236d0d9e0 ) )
14+ * ** tests:** bump steady to v0.19.6 ([ 01d5cde] ( https://github.com/stainless-commons/stripe-sql/commit/01d5cdebb2577d2bd3716a53aae26654a6881e65 ) )
15+ * ** tests:** bump steady to v0.19.7 ([ 77881f1] ( https://github.com/stainless-commons/stripe-sql/commit/77881f17bf5ec4d3aae93842e35522b1626b3153 ) )
16+ * ** tests:** bump steady to v0.20.1 ([ caecce0] ( https://github.com/stainless-commons/stripe-sql/commit/caecce006ec4da82fe07d4007e7033ed5d7f0b34 ) )
17+ * ** tests:** bump steady to v0.20.2 ([ 65b284f] ( https://github.com/stainless-commons/stripe-sql/commit/65b284f35ffae8cb04abdee3ee2a0161882923cc ) )
18+ * ** tests:** bump steady to v0.22.1 ([ ef16d9b] ( https://github.com/stainless-commons/stripe-sql/commit/ef16d9b6411f06e7f424938ceaab2174a3077ae9 ) )
19+
20+
21+ ### Documentation
22+
23+ * explain caching ([ c9ad730] ( https://github.com/stainless-commons/stripe-sql/commit/c9ad7300a4a279955f8fc2ef1f4cf8b7a3d45c39 ) )
24+
325## 0.2.0 (2026-03-17)
426
527Full Changelog: [ v0.1.1...v0.2.0] ( https://github.com/stainless-commons/stripe-sql/compare/v0.1.1...v0.2.0 )
Original file line number Diff line number Diff line change @@ -111,6 +111,23 @@ LIMIT 200;
111111> removed, then PostgreSQL may not [ push down the condition] ( https://wiki.postgresql.org/wiki/Inlining_of_SQL_functions ) ,
112112> causing all pages to be requested and buffered.
113113
114+ ## Caching
115+
116+ Sending requests to the Stripe API for every SQL query can be slow. Combine [ materialized views] ( https://www.postgresql.org/docs/current/rules-materializedviews.html ) with [ ` pg_cron ` ] ( https://github.com/citusdata/pg_cron ) for scheduled data pulls:
117+
118+ ``` sql
119+ CREATE MATERIALIZED VIEW stripe_coupons AS
120+ SELECT *
121+ FROM stripe_coupons .list ();
122+
123+ -- Refresh the view every 4 hours.
124+ SELECT cron .schedule (
125+ ' refresh-stripe-coupons' ,
126+ ' 0 */4 * * *' ,
127+ ' REFRESH MATERIALIZED VIEW CONCURRENTLY stripe_coupons'
128+ );
129+ ```
130+
114131## Troubleshooting
115132
116133### Installation
Original file line number Diff line number Diff line change @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}"
2222# Run steady mock on the given spec
2323if [ " $1 " == " --daemon" ]; then
2424 # Pre-install the package so the download doesn't eat into the startup timeout
25- npm exec --package=@stdy/cli@0.19.3 -- steady --version
25+ npm exec --package=@stdy/cli@0.22.1 -- steady --version
2626
27- npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets " $URL " & > .stdy.log &
27+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator- query-object-format=brackets --validator-form -object-format=brackets " $URL " & > .stdy.log &
2828
2929 # Wait for server to come online via health endpoint (max 30s)
3030 echo -n " Waiting for server"
@@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then
4848
4949 echo
5050else
51- npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets " $URL "
51+ npm exec --package=@stdy/cli@0.22.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator- query-object-format=brackets --validator-form -object-format=brackets " $URL "
5252fi
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ if [ "$PG_MAJOR_VERSION" -ge 18 ]; then
2929 done
3030 POSTGRES_CONFIG=(-c extension_control_path=" $( realpath temp/install/share/postgresql) " )
3131else
32- # In PostgreSQL <18 we cannot point `postgres` to our local extensions directory. So we install directly to
33- # the system.
32+ # In PostgreSQL <18 we cannot point `postgres` to our local extensions directory. So we install
33+ # directly to the system.
3434 sudo make install PG_CONFIG=" $( command -v pg_config) "
3535fi
3636
6161echo " ==> Running setup.sql"
6262psql -d postgres -f test/sql/create_extension.sql
6363
64+ if [ -n " $STRIPE_SECRET_KEY " ]; then
65+ psql -d postgres --variable " value='$STRIPE_SECRET_KEY '" -c ' ALTER DATABASE postgres SET stripe.secret_key = :value;'
66+ fi
67+ if [ -n " $STRIPE_BASE_URL " ]; then
68+ psql -d postgres --variable " value='$STRIPE_BASE_URL '" -c ' ALTER DATABASE postgres SET stripe.base_url = :value;'
69+ fi
70+
6471if command -v pgcli & > /dev/null; then
6572 echo " ==> Starting pgcli REPL"
6673 pgcli postgres
6774else
6875 echo " ==> Starting psql REPL (TIP: Install pgcli for better autocomplete!)"
6976 psql -d postgres
70- fi
77+ fi
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ elif ! steady_is_running ; then
4343 echo -e " To run the server, pass in the path or url of your OpenAPI"
4444 echo -e " spec to the steady command:"
4545 echo
46- echo -e " \$ ${YELLOW} npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-query-object-format=brackets${NC} "
46+ echo -e " \$ ${YELLOW} npm exec --package=@stdy/cli@0.22.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=brackets --validator-form-array-format=brackets --validator- query-object-format=brackets --validator-form -object-format=brackets${NC} "
4747 echo
4848
4949 exit 1
You can’t perform that action at this time.
0 commit comments