rails-ai-context 5.12.0 → 5.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16b12889884c4694d6e4a0c9e7f13f5eeefadfc2335e3a1706e94f7d50ce0696
|
|
4
|
+
data.tar.gz: 7dcef331b58f8fb58d2cc4708bb2081a47ea45807fdb8feca42f31a3fe3185cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 76ffa75a43e4f58344addab5a5dcd1a305b390bb987b33be27ecab456ba3e8cd07b99791e410d11a91591211131c4cc9304ba79dbc760349fa1dbe18d7d3d7c2
|
|
7
|
+
data.tar.gz: 34e7d398f0d6157f36d9f4a606f8f53b6f5d59fdafeb156e4fd654547e1d837254e407e647bda55bfc624909bb3b6dcaa20f00a92f4ccc5630e27997188afd63
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [5.12.1] - 2026-07-10
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- `rails_query` no longer fails on MySQL with `Transaction characteristics can't be changed while a transaction is in progress`. `execute_mysql` issued `SET TRANSACTION READ ONLY` inside `conn.transaction`, but Rails materializes the lazy `BEGIN` before the first in-block statement, so MySQL (error 1568) rejected the SET on every call -- a 100% failure rate for plain queries and `explain: true`. The SET now runs before the transaction opens; without `GLOBAL`/`SESSION` scope it applies only to the next transaction, which the query transaction immediately consumes, so the read-only guard still holds and nothing leaks onto the pooled connection. PostgreSQL (where `SET TRANSACTION` applies to the current transaction) and SQLite are unaffected. (#89)
|
|
13
|
+
- The static `schema.rb` parser now recognizes the PostgreSQL `timestamptz` and `tsvector` column types. `t.timestamptz` and `t.tsvector` columns were dropped from the parsed schema because the DSL listener's column-type set omitted them, so schema-backed tools under-reported columns on Postgres apps using `timestamp with time zone` or full-text search vectors. (#88)
|
|
14
|
+
|
|
8
15
|
## [5.12.0] - 2026-06-29
|
|
9
16
|
|
|
10
17
|
### Fixed
|
|
@@ -8,10 +8,10 @@ module RailsAiContext
|
|
|
8
8
|
class SchemaDslListener < BaseListener
|
|
9
9
|
COLUMN_TYPES = %w[
|
|
10
10
|
string integer text boolean datetime date decimal float binary
|
|
11
|
-
references belongs_to jsonb json uuid bigint timestamp time
|
|
11
|
+
references belongs_to jsonb json uuid bigint timestamp timestamptz time
|
|
12
12
|
inet cidr macaddr hstore ltree numrange tsrange daterange
|
|
13
13
|
bit bit_varying money oid xml point line lseg box path
|
|
14
|
-
polygon circle interval serial virtual primary_key
|
|
14
|
+
polygon circle interval serial tsvector virtual primary_key
|
|
15
15
|
].to_set.freeze
|
|
16
16
|
|
|
17
17
|
def on_call_node_enter(node)
|
|
@@ -307,9 +307,16 @@ module RailsAiContext
|
|
|
307
307
|
sql
|
|
308
308
|
end
|
|
309
309
|
|
|
310
|
+
# The SET must run BEFORE the transaction opens: Rails materializes
|
|
311
|
+
# the lazy BEGIN ahead of the first in-block statement, and MySQL
|
|
312
|
+
# rejects changing transaction characteristics mid-transaction
|
|
313
|
+
# (error 1568). Without GLOBAL/SESSION scope the SET applies only to
|
|
314
|
+
# the next transaction, which the block below immediately consumes,
|
|
315
|
+
# so the read-only characteristic cannot leak onto the pooled
|
|
316
|
+
# connection. (#89)
|
|
310
317
|
result = nil
|
|
318
|
+
conn.execute("SET TRANSACTION READ ONLY")
|
|
311
319
|
conn.transaction do
|
|
312
|
-
conn.execute("SET TRANSACTION READ ONLY")
|
|
313
320
|
result = conn.select_all(hinted_sql)
|
|
314
321
|
raise ActiveRecord::Rollback
|
|
315
322
|
end
|