Skip to content

Fix schema connection caching#959

Open
circulon wants to merge 5 commits intoMasoniteFramework:3.xfrom
circulon:fix/958_for_3.0_Schema_connection_caching
Open

Fix schema connection caching#959
circulon wants to merge 5 commits intoMasoniteFramework:3.xfrom
circulon:fix/958_for_3.0_Schema_connection_caching

Conversation

@circulon
Copy link
Copy Markdown
Contributor

@circulon circulon commented Mar 26, 2026

fixes #958

added a get_connection() method which returns the current connection object.

Additional:
added a helper to get a QueryBuilder instance associated with the same connection.
This allows easier usage of arbitrary queries (like DDL and SET statements) to be applied during migrations.

MOTE: new_connection() does not cache the returned connection.
this allows independant connections to be used alongside each other without interaction

new_connection() now returns a new connection object and does not cache it
get_connection() returns a cached connection or a new one if there is none cached
added a helper method for getting a query builder.
This facilitates running arbitrary queries in migrations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant