Sign inSign up

sophos/xo

By sophos

Updated over 8 years ago

Image
0

1.1K

sophos/xo repository overview

About xo

Build Status Docker Pulls Go Report Card

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:

PostgreSQLMySQLOracleMicrosoft SQL ServerSQLite
Models:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:
Primary Keys:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:
Foreign Keys:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:
Indexes:white_check_mark::white_check_mark::white_check_mark::white_check_mark::white_check_mark:
Stored Procs:white_check_mark::white_check_mark:
ENUM types:white_check_mark::white_check_mark:
Custom types:white_check_mark:

Tag summary

Content type

Image

Digest

Size

5.8 MB

Last updated

over 8 years ago

docker pull sophos/xo