xo

支持 PostgreSQL、MySQL、SQLite、Oracle 和 Microsoft SQL Server 的命令行工具,为 SQL 数据库生成惯用的 Go 代码。「Command line tool to generate idiomatic Go code for SQL databases supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server」

Github星跟踪图

About xo

xo is a command-line tool to generate Go
code based on a database schema or a custom query.

xo works by using database metadata and SQL introspection queries to discover
the types and relationships contained within a schema, and applying a standard
set of base (or customized) Go templates against the discovered relationships.

Currently, xo can generate types for tables, enums, stored procedures, and
custom SQL queries for PostgreSQL, MySQL, Oracle, Microsoft SQL Server, and
SQLite3 databases.

NOTE: While the code generated by xo is production quality, it is not the
goal, nor the intention for xo to be a "silver bullet," nor to completely
eliminate the manual authoring of SQL / Go code.

Database Feature Support

The following is a matrix of the feature support for each database:

主要指标

概览
名称与所有者xo/dbtpl
主编程语言Go
编程语言Go (语言数: 7)
平台Linux, Mac, Windows
许可证MIT License
所有者活动
创建于2016-02-05 10:22:20
推送于2025-06-23 21:32:48
最后一次提交2025-06-24 04:32:22
发布数4
最新版本名称v1.1.0 (发布于 )
第一版名称v1.0.0 (发布于 )
用户参与
星数3.9k
关注者数67
派生数330
提交数435
已启用问题?
问题数264
打开的问题数48
拉请求数53
打开的拉请求数6
关闭的拉请求数100
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?