Alzabo...::MySQL(3pm)
π Alzabo::SQLMaker::MySQL π
okay bestie, so this is the MySQL flavor of Alzabo's SQL-making class β it lives in the User Contributed Perl Documentation section, and it's here to make MySQL-specific SQL for you. let's go π¦
β¨ NAME β¨
Alzabo::SQLMaker::MySQL β the Alzabo SQL making class for MySQL. no cap, that's literally the whole name π
β¨ SYNOPSIS β¨
you spin it up like this, and honestly? iconic:
use Alzabo::SQLMaker;
my $sql = Alzabo::SQLMaker->new( sql => 'MySQL' );
β¨ DESCRIPTION β¨
so this class implements MySQL-specific SQL creation. and here's the thing you gotta know, bestie β MySQL does not allow subselects. like, at all. so if you try to use a subselect, which happens by passing an Alzabo::SQMaker object in as a parameter to a method, you're gonna get an Alzabo::Exception::SQL error thrown at you. it's giving "no β€οΈ". π
β¨ METHODS β¨
almost everything inherited from Alzabo::SQLMaker is used exactly as is. no notes. the only overridden methods are limit() and get_limit(), and that's because MySQL actually does allow a LIMIT clause in its SQL. slay π
β¨ EXPORTED SQL FUNCTIONS β¨
SQL can be imported by name or by tags. they take arguments as documented in the MySQL documentation (version 3.23.39). the functions, organized by tag, are:
πΈ :math πΈ
PI
RAND
MOD
ROUND
POW
POWER
ATAN2
ABS
SIGN
FLOOR
CEILING
EXP
LOG
LOG10
SQRT
COS
SIN
TAN
ACOS
ASIN
ATAN
COT
DEGREES
RADIANS
TRUNCATE
π :string π
CHAR
POSITION
INSTR
LEFT
RIGHT
FIND_IN_SET
REPEAT
LEAST
GREATEST
CONCAT
ELT
FIELD
MAKE_SET
LOCATE
SUBSTRING
CONV
LPAD
RPAD
MID
SUBSTRING_INDEX
REPLACE
CONCAT_WS
EXPORT_SET
INSERT
ASCII
ORD
BIN
OCT
HEX
LENGTH
OCTET_LENGTH
CHAR_LENGTH
CHARACTER_LENGTH
TRIM
LTRIM
RTRIM
SOUNDEX
SPACE
REVERSE
LCASE
LOWER
UCASE
UPPER
π¦ :datetime π¦
CURDATE
CURRENT_DATE
CURTIME
CURRENT_TIME
NOW
SYSDATE
CURRENT_TIMESTAMP
UNIX_TIMESTAMP
WEEK
PERIOD_ADD
PERIOD_DIFF
DATE_ADD
DATE_SUB
ADDDATE
SUBDATE
DATE_FORMAT
TIME_FORMAT
FROM_UNIXTIME
DAYOFWEEK
WEEKDAY
DAYOFYEAR
MONTH
DAYNAME
MONTHNAME
QUARTER
YEAR
YEARWEEK
HOUR
MINUTE
SECOND
TO_DAYS
FROM_DAYS
SEC_TO_TIME
TIME_TO_SEC
π :aggregate π
these are functions which operate on an aggregate set of values all at once. like, the whole squad at the same time, periodt.
COUNT
AVG
MIN
MAX
SUM
STD
STDDEV
β :system β
these are functions which return information about the MySQL server. nosy but make it useful π«Ά
DATABASE
USER
SYSTEM_USER
SESSION_USER
VERSION
CONNECTION_ID
LAST_INSERT_ID
GET_LOCK
RELEASE_LOCK
BENCHMARK
MASTER_POS_WAIT
π§ :control π§
these are flow control functions:
IFNULL
NULLIF
IF
π :misc π
these are functions which don't fit into any other categories. they're the miscellaneous girlies, and we love them anyway:
ENCRYPT
ENCODE
DECODE
FORMAT
INET_NTOA
INET_ATON
BIT_OR
BIT_AND
PASSWORD
MD5
LOAD_FILE
π₯ :fulltext π₯
these are functions related to MySQL's fulltext searching capabilities:
MATCH
AGAINST
IN_BOOLEAN_MODE
NOTE: In MySQL 4.0 and greater, it is possible to say that a search is in boolean mode in order to change how MySQL handles the argument given to AGAINST. This will not work with earlier versions. so check your version first, bestie, fr fr π
π :common π
these are functions from other groups that are most commonly used. the main characters, honestly π
NOW
COUNT
AVG
MIN
MAX
SUM
DISTINCT
β¨ AUTHOR β¨
Dave Rolsky, <dave@urth.org> π
okay that's the whole page, and you ate it up. this was documented as part of perl v5.34.0 and the page is dated 2022-06-14. go forth and make some MySQL SQL, bestie πβ¨π
π¦ where this page comes from
- debian bookworm: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libalzabo-perl 0.92-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms