{"metadata":{"name":"hew/db/mysql","vers":"0.7.2","description":"Actor-owned MySQL client with typed errors and query snapshots","license":"MIT OR Apache-2.0","authors":["Hew Contributors"],"deps":[{"name":"hew.db.sql","req":"0.7.0","features":[],"optional":false,"default_features":true}],"features":{},"keywords":["database","mysql","sql"],"repository":"https://github.com/hew-lang/ecosystem","edition":"2026","hew":">=0.10.0, <0.12.0","readme":"# hew.db.mysql\n\n`hew.db.mysql` owns each MySQL connection in an actor. Operations fail with a\ntyped `MysqlError`, which a call reports as `.Err(.Failed(error))`; query\nreplies are immutable wire-safe snapshots, and SQL `NULL` is represented by `CellValue.Null` rather than an empty-string sentinel.\n`QueryResult`, `Row` and `CellValue` come from [`hew.db.sql`](../sql/README.md),\nshared with SQLite and PostgreSQL.\n\n```hew\nimport hew.db.mysql;\nimport std.encoding.utf8;\n\nfn main() {\n    let db = spawn mysql.Conn { url: \"mysql://hew:hew@127.0.0.1:3306/hew_test\" };\n    match db.query(\"SELECT 41 AS value\") {\n        .Ok(query) => match query.rows[0].values[0] {\n            .Text(value) => println(utf8.decode_lossy(value)),\n            .Null => println(\"value is NULL\"),\n        }\n        .Err(.Failed(error)) => println(mysql.error_message(error)),\n        .Err(_) => println(\"MySQL actor stopped before replying\"),\n    }\n    stop(db);\n    stopped(db);\n}\n```\n\nThe checked example lives at [`examples/basic.hew`](examples/basic.hew). With\nMySQL listening locally and the `hew_test` database/user configured, run it from\nthe ecosystem checkout:\n\n```sh\nhew run --pkg-path . db/mysql/examples/basic.hew\n```\n\nParameterized methods accept `Vec<Param>` from `hew.db.sql`. For example,\n`[Param.Int(42), Param.Text(\"First line\\nSecond line\"), Param.Null]` binds three\nvalues. Use `Param.Bytes(data)` for arbitrary binary data, including invalid\nUTF-8. Empty values and NULL stay distinct. See [typed SQL parameters](../sql/README.md)\nfor all six variants and database-specific conversions. Cell payloads remain\n`bytes`, preserving exact values. SQL strings cross the native boundary with\nexplicit lengths.\n"},"version":{"name":"hew/db/mysql","vers":"0.7.0-rc2","deps":[{"name":"hew.db.sql","req":"0.7.0-rc2","features":[],"optional":false,"default_features":true}],"features":{},"cksum":"sha256:e71c9d01145066f663ae7fe6f3f570cb3b54ae570c226678b1c5c70bac53a99c","sig":"ed25519:90b1b3e646784b643b665f891b0d7d3740a833efffd4f690d0c59881a1c41586ddf3163ae1e19ae1afe835c951891f2463b261fc9b6e1fcac8afa78dd52c2f0f","key_fp":"SHA256:sFX33aRocZfvHKm7NmU4zQHnCoCP32v1uTkJhbVQAWM","yanked":false,"edition":"2026","hew":">=0.10.0, <0.11.0","registry_sig":"ed25519:c0394b740ba147a9723fab94cbda55f5b7d3178335eed2d5e69e2efbecbbc5b8f645bc84e4e676acc21663528ae9a0d9c04e2583cb149d1fb3ca216f6b4caf01","registry_key_fp":"SHA256:NR2yrof9/ZWkCWyhDODRU8Yvm9Lob/0yYVTdCKzMHb8","published_at":"2026-11-11T11:34:58.429Z","dl":"https://cdn.hewpkg.com/tarballs/hew/db/mysql/0.7.0-rc2.tar.zst"}}