Skip to content

Commit

Permalink
Merge branch 'main' into lucas/circuit-audit
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaslopezf authored Aug 22, 2024
2 parents f18776f + e88c138 commit ffd4927
Show file tree
Hide file tree
Showing 175 changed files with 1,354 additions and 754 deletions.
3 changes: 3 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ issues:
- text: "SA1019: params.SendEnabled is deprecated" # TODO remove once ready to remove from the sdk
linters:
- staticcheck
- text: "SA1029: Inappropriate key in context.WithValue" # TODO remove this when dependency is updated
linters:
- staticcheck
- text: "leading space"
linters:
- nolintlint
Expand Down
10 changes: 5 additions & 5 deletions client/debug/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func getCodecInterfaces() *cobra.Command {
// getCodecInterfaceImpls creates and returns a new cmd used for listing all registered implementations of a given interface on the application codec.
func getCodecInterfaceImpls() *cobra.Command {
return &cobra.Command{
Use: "list-implementations [interface]",
Use: "list-implementations <interface>",
Short: "List the registered type URLs for the provided interface",
Long: "List the registered type URLs that can be used for the provided interface name using the application codec",
Example: fmt.Sprintf("%s debug codec list-implementations cosmos.crypto.PubKey", version.AppName),
Expand All @@ -109,7 +109,7 @@ func getPubKeyFromString(ctx client.Context, pkstr string) (cryptotypes.PubKey,

func PubkeyCmd() *cobra.Command {
return &cobra.Command{
Use: "pubkey [pubkey]",
Use: "pubkey <pubkey>",
Short: "Decode a pubkey from proto JSON",
Long: "Decode a pubkey from proto JSON and display it's address.",
Example: fmt.Sprintf(`%s debug pubkey '{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AurroA7jvfPd1AadmmOvWM2rJSwipXfRf8yD6pLbA2DJ"}'`, version.AppName),
Expand Down Expand Up @@ -181,7 +181,7 @@ func getPubKeyFromRawString(pkstr, keytype string) (cryptotypes.PubKey, error) {

func PubkeyRawCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "pubkey-raw [pubkey] -t [{ed25519, secp256k1}]",
Use: "pubkey-raw <pubkey> [-t {ed25519, secp256k1}]",
Short: "Decode a ED25519 or secp256k1 pubkey from hex, base64, or bech32",
Long: "Decode a pubkey from hex, base64, or bech32.",
Example: fmt.Sprintf(`
Expand Down Expand Up @@ -247,7 +247,7 @@ func PubkeyRawCmd() *cobra.Command {

func AddrCmd() *cobra.Command {
return &cobra.Command{
Use: "addr [address]",
Use: "addr <address>",
Short: "Convert an address between hex and bech32",
Example: fmt.Sprintf("%s debug addr cosmos1e0jnq2sun3dzjh8p2xq95kk0expwmd7shwjpfg", version.AppName),
Args: cobra.ExactArgs(1),
Expand Down Expand Up @@ -303,7 +303,7 @@ func AddrCmd() *cobra.Command {

func RawBytesCmd() *cobra.Command {
return &cobra.Command{
Use: "raw-bytes [raw-bytes]",
Use: "raw-bytes <raw-bytes>",
Short: "Convert raw bytes output (eg. [10 21 13 255]) to hex",
Long: "Convert raw-bytes to hex.",
Example: fmt.Sprintf("%s debug raw-bytes [72 101 108 108 111 44 32 112 108 97 121 103 114 111 117 110 100]", version.AppName),
Expand Down
4 changes: 2 additions & 2 deletions client/grpc/cmtservice/autocli.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ var CometBFTAutoCLIDescriptor = &autocliv1.ServiceCommandDescriptor{
},
{
RpcMethod: "GetBlockByHeight",
Use: "block-by-height [height]",
Use: "block-by-height <height>",
Short: "Query for a committed block by height",
Long: "Query for a specific committed block using the CometBFT RPC `block_by_height` method",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "height"}},
Expand All @@ -38,7 +38,7 @@ var CometBFTAutoCLIDescriptor = &autocliv1.ServiceCommandDescriptor{
},
{
RpcMethod: "GetValidatorSetByHeight",
Use: "validator-set-by-height [height]",
Use: "validator-set-by-height <height>",
Short: "Query for a validator set by height",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "height"}},
},
Expand Down
2 changes: 1 addition & 1 deletion client/keys/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const (
// ShowKeysCmd shows key information for a given key name.
func ShowKeysCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "show [name_or_address [name_or_address...]]",
Use: "show <name_or_address> [name_or_address...]",
Short: "Retrieve key information by name or address",
Long: `Display keys details. If multiple names or addresses are provided,
then an ephemeral multisig key will be created under the name "multi"
Expand Down
24 changes: 24 additions & 0 deletions client/v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,30 @@ AutoCLI can create a gov proposal of any tx by simply setting the `GovProposal`
Users can however use the `--no-proposal` flag to disable the proposal creation (which is useful if the authority isn't the gov module on a chain).
:::

### Conventions for the `Use` field in Cobra

According to the [Cobra documentation](https://pkg.go.dev/github.com/spf13/cobra#Command) the following conventions should be followed for the `Use` field in Cobra commands:

1. **Required arguments**:
* Should not be enclosed in brackets. They can be enclosed in angle brackets `< >` for clarity.
* Example: `command <required_argument>`

2. **Optional arguments**:
* Should be enclosed in square brackets `[ ]`.
* Example: `command [optional_argument]`

3. **Alternative (mutually exclusive) arguments**:
* Should be enclosed in curly braces `{ }`.
* Example: `command {-a | -b}` for required alternatives.
* Example: `command [-a | -b]` for optional alternatives.

4. **Multiple arguments**:
* Indicated with `...` after the argument.
* Example: `command argument...`

5. **Combination of options**:
* Example: `command [-F file | -D dir]... [-f format] profile`

### Specifying Subcommands

By default, `autocli` generates a command for each method in your gRPC service. However, you can specify subcommands to group related commands together. To specify subcommands, use the `autocliv1.ServiceCommandDescriptor` struct.
Expand Down
8 changes: 4 additions & 4 deletions client/v2/autocli/msg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var bankAutoCLI = &autocliv1.ServiceCommandDescriptor{
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Send",
Use: "send [from_key_or_address] [to_address] [amount] [flags]",
Use: "send <from_key_or_address> <to_address> <amount> [flags]",
Short: "Send coins from one account to another",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount"}},
},
Expand All @@ -64,7 +64,7 @@ func TestMsg(t *testing.T) {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Send",
Use: "send [from_key_or_address] [to_address] [amount] [flags]",
Use: "send <from_key_or_address> <to_address> <amount> [flags]",
Short: "Send coins from one account to another",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "from_address"}, {ProtoField: "to_address"}, {ProtoField: "amount"}},
},
Expand All @@ -83,7 +83,7 @@ func TestMsg(t *testing.T) {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Send",
Use: "send [from_key_or_address] [to_address] [amount] [flags]",
Use: "send <from_key_or_address> <to_address> <amount> [flags]",
Short: "Send coins from one account to another",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "to_address"}, {ProtoField: "amount"}},
// from_address should be automatically added
Expand All @@ -104,7 +104,7 @@ func TestMsg(t *testing.T) {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{
RpcMethod: "Send",
Use: "send [from_key_or_address] [to_address] [amount] [flags]",
Use: "send <from_key_or_address> <to_address> <amount> [flags]",
Short: "Send coins from one account to another",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "to_address"}, {ProtoField: "amount"}},
FlagOptions: map[string]*autocliv1.FlagOptions{
Expand Down
2 changes: 1 addition & 1 deletion client/v2/autocli/testdata/help-echo-msg.golden
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Send coins from one account to another

Usage:
test send [from_key_or_address] [to_address] [amount] [flags]
test send <from_key_or_address> <to_address> <amount> [flags]

Flags:
-a, --account-number uint The account number of the signing account (offline mode only)
Expand Down
2 changes: 1 addition & 1 deletion client/v2/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ require (
github.com/petermattis/goid v0.0.0-20240327183114-c42a807a84ba // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.0 // indirect
github.com/prometheus/client_golang v1.20.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions client/v2/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -413,8 +413,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.20.0 h1:jBzTZ7B099Rg24tny+qngoynol8LtVYlA2bqx3vEloI=
github.com/prometheus/client_golang v1.20.0/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8=
github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand Down
2 changes: 1 addition & 1 deletion core/store/changeset.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Changeset struct {
}

// StateChanges represents a set of changes to the state of an actor in storage.
type StateChanges struct {
type StateChanges = struct {
Actor []byte // actor represents the space in storage where state is stored, previously this was called a "storekey"
StateChanges KVPairs // StateChanges is a list of key-value pairs representing the changes to the state.
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/mdp/qrterminal/v3 v3.2.0
github.com/muesli/termenv v0.15.2
github.com/prometheus/client_golang v1.20.0
github.com/prometheus/client_golang v1.20.1
github.com/prometheus/common v0.55.0
github.com/rs/zerolog v1.33.0
github.com/spf13/cast v1.7.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -402,8 +402,8 @@ github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2/go.mod h1:iKH
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.20.0 h1:jBzTZ7B099Rg24tny+qngoynol8LtVYlA2bqx3vEloI=
github.com/prometheus/client_golang v1.20.0/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_golang v1.20.1 h1:IMJXHOD6eARkQpxo8KkhgEVFlBNm+nkrFUyGlIu7Na8=
github.com/prometheus/client_golang v1.20.1/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand Down
4 changes: 2 additions & 2 deletions indexer/postgres/base_sql.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package postgres

// BaseSQL is the base SQL that is always included in the schema.
const BaseSQL = `
// baseSQL is the base SQL that is always included in the schema.
const baseSQL = `
CREATE OR REPLACE FUNCTION nanos_to_timestamptz(nanos bigint) RETURNS timestamptz AS $$
SELECT to_timestamp(nanos / 1000000000) + (nanos / 1000000000) * INTERVAL '1 microsecond'
$$ LANGUAGE SQL IMMUTABLE;
Expand Down
4 changes: 2 additions & 2 deletions indexer/postgres/column.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// createColumnDefinition writes a column definition within a CREATE TABLE statement for the field.
func (tm *ObjectIndexer) createColumnDefinition(writer io.Writer, field schema.Field) error {
func (tm *objectIndexer) createColumnDefinition(writer io.Writer, field schema.Field) error {
_, err := fmt.Fprintf(writer, "%q ", field.Name)
if err != nil {
return err
Expand Down Expand Up @@ -110,7 +110,7 @@ func simpleColumnType(kind schema.Kind) string {
// updatableColumnName is the name of the insertable/updatable column name for the field.
// This is the field name in most cases, except for time columns which are stored as nanos
// and then converted to timestamp generated columns.
func (tm *ObjectIndexer) updatableColumnName(field schema.Field) (name string, err error) {
func (tm *objectIndexer) updatableColumnName(field schema.Field) (name string, err error) {
name = field.Name
if field.Kind == schema.TimeKind {
name = fmt.Sprintf("%s_nanos", name)
Expand Down
4 changes: 2 additions & 2 deletions indexer/postgres/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"database/sql"
)

// DBConn is an interface that abstracts the *sql.DB, *sql.Tx and *sql.Conn types.
type DBConn interface {
// dbConn is an interface that abstracts the *sql.DB, *sql.Tx and *sql.Conn types.
type dbConn interface {
ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
Expand Down
20 changes: 10 additions & 10 deletions indexer/postgres/create_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,25 @@ import (
"strings"
)

// CreateTable creates the table for the object type.
func (tm *ObjectIndexer) CreateTable(ctx context.Context, conn DBConn) error {
// createTable creates the table for the object type.
func (tm *objectIndexer) createTable(ctx context.Context, conn dbConn) error {
buf := new(strings.Builder)
err := tm.CreateTableSql(buf)
err := tm.createTableSql(buf)
if err != nil {
return err
}

sqlStr := buf.String()
if tm.options.Logger != nil {
tm.options.Logger(fmt.Sprintf("Creating table %s", tm.TableName()), sqlStr)
if tm.options.logger != nil {
tm.options.logger.Debug("Creating table %s", "table", tm.tableName(), "sql", sqlStr)
}
_, err = conn.ExecContext(ctx, sqlStr)
return err
}

// CreateTableSql generates a CREATE TABLE statement for the object type.
func (tm *ObjectIndexer) CreateTableSql(writer io.Writer) error {
_, err := fmt.Fprintf(writer, "CREATE TABLE IF NOT EXISTS %q (\n\t", tm.TableName())
// createTableSql generates a CREATE TABLE statement for the object type.
func (tm *objectIndexer) createTableSql(writer io.Writer) error {
_, err := fmt.Fprintf(writer, "CREATE TABLE IF NOT EXISTS %q (\n\t", tm.tableName())
if err != nil {
return err
}
Expand Down Expand Up @@ -53,7 +53,7 @@ func (tm *ObjectIndexer) CreateTableSql(writer io.Writer) error {
}

// add _deleted column when we have RetainDeletions set and enabled
if !tm.options.DisableRetainDeletions && tm.typ.RetainDeletions {
if !tm.options.disableRetainDeletions && tm.typ.RetainDeletions {
_, err = fmt.Fprintf(writer, "_deleted BOOLEAN NOT NULL DEFAULT FALSE,\n\t")
if err != nil {
return err
Expand Down Expand Up @@ -87,7 +87,7 @@ func (tm *ObjectIndexer) CreateTableSql(writer io.Writer) error {
// we GRANT SELECT on the table to PUBLIC so that the table is automatically available
// for querying using off-the-shelf tools like pg_graphql, Postgrest, Postgraphile, etc.
// without any login permissions
_, err = fmt.Fprintf(writer, "GRANT SELECT ON TABLE %q TO PUBLIC;", tm.TableName())
_, err = fmt.Fprintf(writer, "GRANT SELECT ON TABLE %q TO PUBLIC;", tm.tableName())
if err != nil {
return err
}
Expand Down
17 changes: 9 additions & 8 deletions indexer/postgres/create_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import (

"cosmossdk.io/indexer/postgres/internal/testdata"
"cosmossdk.io/schema"
"cosmossdk.io/schema/logutil"
)

func ExampleObjectIndexer_CreateTableSql_allKinds() {
func Example_objectIndexer_createTableSql_allKinds() {
exampleCreateTable(testdata.AllKindsObject)
// Output:
// CREATE TABLE IF NOT EXISTS "test_all_kinds" (
Expand Down Expand Up @@ -40,7 +41,7 @@ func ExampleObjectIndexer_CreateTableSql_allKinds() {
// GRANT SELECT ON TABLE "test_all_kinds" TO PUBLIC;
}

func ExampleObjectIndexer_CreateTableSql_singleton() {
func Example_objectIndexer_createTableSql_singleton() {
exampleCreateTable(testdata.SingletonObject)
// Output:
// CREATE TABLE IF NOT EXISTS "test_singleton" (
Expand All @@ -53,7 +54,7 @@ func ExampleObjectIndexer_CreateTableSql_singleton() {
// GRANT SELECT ON TABLE "test_singleton" TO PUBLIC;
}

func ExampleObjectIndexer_CreateTableSql_vote() {
func Example_objectIndexer_createTableSql_vote() {
exampleCreateTable(testdata.VoteObject)
// Output:
// CREATE TABLE IF NOT EXISTS "test_vote" (
Expand All @@ -66,7 +67,7 @@ func ExampleObjectIndexer_CreateTableSql_vote() {
// GRANT SELECT ON TABLE "test_vote" TO PUBLIC;
}

func ExampleObjectIndexer_CreateTableSql_vote_no_retain_delete() {
func Example_objectIndexer_createTableSql_vote_no_retain_delete() {
exampleCreateTableOpt(testdata.VoteObject, true)
// Output:
// CREATE TABLE IF NOT EXISTS "test_vote" (
Expand All @@ -83,11 +84,11 @@ func exampleCreateTable(objectType schema.ObjectType) {
}

func exampleCreateTableOpt(objectType schema.ObjectType, noRetainDelete bool) {
tm := NewObjectIndexer("test", objectType, Options{
Logger: func(msg, sql string, params ...interface{}) {},
DisableRetainDeletions: noRetainDelete,
tm := newObjectIndexer("test", objectType, options{
logger: logutil.NoopLogger{},
disableRetainDeletions: noRetainDelete,
})
err := tm.CreateTableSql(os.Stdout)
err := tm.createTableSql(os.Stdout)
if err != nil {
panic(err)
}
Expand Down
14 changes: 7 additions & 7 deletions indexer/postgres/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"cosmossdk.io/schema"
)

// CreateEnumType creates an enum type in the database.
func (m *ModuleIndexer) CreateEnumType(ctx context.Context, conn DBConn, enum schema.EnumType) error {
// createEnumType creates an enum type in the database.
func (m *moduleIndexer) createEnumType(ctx context.Context, conn dbConn, enum schema.EnumType) error {
typeName := enumTypeName(m.moduleName, enum)
row := conn.QueryRowContext(ctx, "SELECT 1 FROM pg_type WHERE typname = $1", typeName)
var res interface{}
Expand All @@ -25,21 +25,21 @@ func (m *ModuleIndexer) CreateEnumType(ctx context.Context, conn DBConn, enum sc
}

buf := new(strings.Builder)
err := CreateEnumTypeSql(buf, m.moduleName, enum)
err := createEnumTypeSql(buf, m.moduleName, enum)
if err != nil {
return err
}

sqlStr := buf.String()
if m.options.Logger != nil {
m.options.Logger("Creating enum type", sqlStr)
if m.options.logger != nil {
m.options.logger.Debug("Creating enum type", "sql", sqlStr)
}
_, err = conn.ExecContext(ctx, sqlStr)
return err
}

// CreateEnumTypeSql generates a CREATE TYPE statement for the enum definition.
func CreateEnumTypeSql(writer io.Writer, moduleName string, enum schema.EnumType) error {
// createEnumTypeSql generates a CREATE TYPE statement for the enum definition.
func createEnumTypeSql(writer io.Writer, moduleName string, enum schema.EnumType) error {
_, err := fmt.Fprintf(writer, "CREATE TYPE %q AS ENUM (", enumTypeName(moduleName, enum))
if err != nil {
return err
Expand Down
Loading

0 comments on commit ffd4927

Please sign in to comment.