THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Jan Henning Thorsen 9e0b70c94e Released version 1.05 4 years ago
examples pubsub.t from Mojo::Pg 6 years ago
lib/Mojo Released version 1.05 4 years ago
t remove debug usage of ddp 4 years ago
.gitignore Add /local to .gitignore 7 years ago
.perltidyrc Updated basic repo files for MySQL 7 years ago
.ship.conf Use App::git::ship 7 years ago
.travis.yml utf8 fix to travis testing 4 years ago
Changes Released version 1.05 4 years ago
LICENSE first commit 7 years ago
MANIFEST.SKIP first commit 7 years ago
Makefile.PL Released version 1.05 4 years ago
README Released version 1.05 4 years ago
README.pod Fix symlink to README.pod 7 years ago
cpanfile Released version 1.05 4 years ago

README

NAME
Mojo::mysql - Mojolicious and Async MySQL

SYNOPSIS
use Mojo::mysql;

# Create a table
my $mysql = Mojo::mysql->strict_mode('mysql://username@/test');
$mysql->db->query(
'create table names (id integer auto_increment primary key, name text)');

# Insert a few rows
my $db = $mysql->db;
$db->query('insert into names (name) values (?)', 'Sara');
$db->query('insert into names (name) values (?)', 'Stefan');

# Insert more rows in a transaction
eval {
my $tx = $db->begin;
$db->query('insert into names (name) values (?)', 'Baerbel');
$db->query('insert into names (name) values (?)', 'Wolfgang');
$tx->commit;
};
say $@ if $@;

# Insert another row and return the generated id
say $db->query('insert into names (name) values (?)', 'Daniel')
->last_insert_id;

# Use SQL::Abstract to generate queries for you
$db->insert('names', {name => 'Isabel'});
say $db->select(