Upstream software project

perl-Mojo-SQL

Safely generate and compose SQL statements

About perl-Mojo-SQL

Safely generate and compose SQL statements

This project links 1 native package record across 1 recorded operating-system release. Compare the retained versions and architectures below, then open the package for your own release.

These are catalog observations, not a guarantee of installation, compatibility, or upstream support.

Project pictures and package coverage

openSUSE Tumbleweed: 1 package records. Catalog coverage diagram, not an application screenshot.perl-Mojo-SQL: recorded package coverageopenSUSE Tumbleweed1 records
OpenFactory diagram of linked package records. It is not an application screenshot.

Project identity

Project
perl-Mojo-SQL
Publisher
Not authoritatively mapped
Native package records
1
Operating systems
opensuse-tumbleweed
License expression
MIT
Source repository
Not reported

Source-reported description

The fullest retained description is shown with its source. Distribution packaging descriptions may include downstream details.

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 '??'. use Mojo::SQL qw(sql); my $role = 'admin'; my $partial = sql('AND role = ?', $role); my $name = 'root'; my $query = sql('SELECT * FROM users WHERE name = ? ?', $name, $partial)->to_query; Make partial statements optional to dynamically generate 'WHERE' clauses. my $optional = $foo ? sql('AND foo IS NOT NULL') : sql(''); my $query = sql('SELECT * FROM users WHERE name = ? ?', 'sebastian', $optional)->to_query; 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. use Mojo::SQL qw(sql sql_unsafe escape_literal); my $role = 'role = ' . escape_literal('power user'); my $partial = sql_unsafe 'AND ?', $role; my $name = 'root'; my $query = sql('SELECT * FROM users WHERE name = ? ?', $name, $partial)->to_query; For databases that do not support numbered placeholders like '$1' and '$2', you can set a custom character with the 'placeholder' option. my $query = sql('SELECT * FROM users WHERE name = ?', 'root')->to_query({placeholder => '?'});

Description source

Packages by operating system

Compare recorded versions, then open a package for dependency, file, checksum, and repository evidence. Version strings are distribution-specific, not a ranking of newer software.

openSUSE Tumbleweed

  1. Package perl-Mojo-SQL

    tumbleweed (openSUSE Tumbleweed) (Unspecified): Safely generate and compose SQL statements

    0.20.0-1.3: noarch

    Source: perl-Mojo-SQL

Project resources and further reading

Mapping provenance

Only source-backed identity signals create public cross-OS links. A reviewer can later approve or dispute an inferred relationship without rewriting native package history.

No field-level source record is published yet.