Use the following syntax to run sqlgen
commands from your terminal window:
sqlgen [command] [flags]
where command
, and flags
are:
command
: Specifies the operation that you want to perform.flags
: Specifies optional flags.
- Create a configuration file
sqlgen.yml
in current directory.
sqlgen init
- Check
sqlgen
version.
sqlgen version
- Generate necessary code for specific location, glob is support.
# sqlgen generate [source]
sqlgen generate ./examples/*.go
# or
sqlgen -c config.yml # this will load `config.yml`
# or
sqlgen # this will load `sqlgen.yml`