A minimal MySQL effect library for the Phantasy functional programming library. Version 1.1.2 is current and stable, but the package has seen no recent releases and depends on the deprecated phantasy package. It provides EffTask-based wrappers around mysql2 for connection pooling, single connections, and queries. It is designed for use with phantasy's Eff monad and is not intended for general use outside that ecosystem.
npm install phantasy-mysqlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a connection pool, obtains a connection, and runs a simple SELECT query.
Migrate to fp-ts and a MySQL library like mysql2 directly.
Always provide an array as second argument to query, e.g., query('SELECT ?', [1], conn).Use runEff from phantasy to execute the EffTask and obtain the pool.
Use ES module import syntax: import { createPool } from 'phantasy-mysql'Ensure PoolOpts includes host (string) and database (string) as required fields.