Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext retrieves a SQL statement from the context chain that matches the given query. It performs a recursive search through the context chain until it finds a matching statement or reaches the end of the chain.
Note: It prevents infinite recursion by checking for self-referential contexts.
func Query ¶
Query returns the underlying SQL query string from a *sql.Stmt. The offset of the query field is determined at init time using reflection, ensuring both safety and runtime performance.
Note: This is an internal function that relies on the sql.Stmt structure. It will panic during package initialization if the structure changes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.