Selecto.Builder.Sql.Helpers
(Selecto v0.4.5)
Copy Markdown
Helper functions shared by SQL builder modules.
Responsibilities include:
- adapter-aware identifier quoting
- identifier safety validation
- selector and join string construction
- support helpers for parameterized join aliases
Summary
Functions
Build join alias string for parameterized joins.
Build selector string for parameterized joins with signature support.
Always quote an identifier through the active adapter.
Get the appropriate quote character for identifiers based on the database adapter. PostgreSQL uses double quotes, MySQL uses backticks, SQLite uses double quotes.
Maybe quote an identifier - only adds quotes if necessary.
Check if an identifier needs quoting. Only quote if it's a reserved word, contains special characters, or has mixed case.
Wrap an identifier with the appropriate quotes for the database adapter. This is the adapter-aware version of double_wrap.
Functions
Build join alias string for parameterized joins.
Build selector string for parameterized joins with signature support.
Always quote an identifier through the active adapter.
Get the appropriate quote character for identifiers based on the database adapter. PostgreSQL uses double quotes, MySQL uses backticks, SQLite uses double quotes.
Maybe quote an identifier - only adds quotes if necessary.
Check if an identifier needs quoting. Only quote if it's a reserved word, contains special characters, or has mixed case.
Wrap an identifier with the appropriate quotes for the database adapter. This is the adapter-aware version of double_wrap.