databases/p5-Mojo-SQL 0.02 FreeBSD
Safely generate and compose SQL statements
- System
- FreeBSD
- Repository
- FreeBSD ports
- Maintainer
- [email protected]
- License
- MIT
- Categories
- databases, perl5
- Package size
- 9.2 KiB, 14.7 KiB installed
Description
Mojo::SQL safely generates and composes SQL statements. To prevent SQL injection attacks, every ? in the input becomes a placeholder in the generated query, with the corresponding value bound to it. Partial statements can be composed recursively to build more complex queries.
Literal question marks can be escaped with ??.
Make partial statements optional to dynamically generate WHERE clauses.
If you need a little more control over the generated SQL query, you can also bypass safety features with "sql_unsafe". But make sure to handle unsafe values yourself with appropriate escaping functions for your database. For PostgreSQL there are "escape_literal" and "escape_identifier" functions included with this module.
For databases that do not support numbered placeholders like $1 and $2, you can set a custom character with the placeholder option.
Install
Binary package:
pkg install p5-Mojo-SQL
From the ports tree:
cd /usr/ports/databases/p5-Mojo-SQL/ && make install clean
To depend on this port in another port's Makefile:
RUN_DEPENDS= p5-Mojo-SQL>0:databases/p5-Mojo-SQL
Packages
The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.
| Repository | aarch64 | amd64 | armv6 | armv7 | i386 |
|---|---|---|---|---|---|
| FreeBSD:14:latest | 0.02 | 0.02 | - | - | 0.02 |
| FreeBSD:14:quarterly | 0.02 | 0.02 | n/a | - | 0.02 |
| FreeBSD:15:latest | 0.02 | 0.02 | n/a | - | - |
| FreeBSD:15:quarterly | 0.02 | 0.02 | n/a | n/a | n/a |
| FreeBSD:16:latest | 0.02 | 0.02 | n/a | n/a | n/a |
| FreeBSD:16:quarterly | n/a | n/a | n/a | n/a | n/a |
Dependencies
As this port's Makefile names them.
Build 1
p5-Mojolicious>=9.41: www/p5-Mojolicious
Runtime 1
p5-Mojolicious>=9.41: www/p5-Mojolicious
The full lists below include those, and their dependencies in turn.
Build dependencies 10
Run dependencies 10
Required by 1
Configuration
No options to configure.
- USES
- perl5
- Service scripts
- none
Files
pkg-plist 4
- %%SITE_PERL%%/Mojo/SQL.pm
- %%SITE_PERL%%/Mojo/SQL/Statement.pm
- %%PERL5_MAN3%%/Mojo::SQL.3.gz
- %%PERL5_MAN3%%/Mojo::SQL::Statement.3.gz
distinfo 1
| File | Size | SHA256 |
|---|---|---|
| Mojo-SQL-0.02.tar.gz | 7378 | 17a5312f0731ff8866f24415020a52e6763ebad84088ec906c0d62147ef3ae00 |
Master sites 1
- CPAN
Commit history 0
No commits in the history this site was built from.