2

Is it possible to generate a create statement (CREATE TABLE...) from a built SQLBoiler model?

// Node is an object representing the database table.
type Node struct {
    ID      int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
    Address null.String `boil:"address" json:"address,omitempty" toml:"address" yaml:"address,omitempty"`

    R *nodeR `boil:"-" json:"-" toml:"-" yaml:"-"`
    L nodeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
}

BigP
  • 117
  • 7
  • 2
    as you can see on repo they said: It is a "database-first" ORM as opposed to "code-first" (like gorm/gorp). That means you must first create your database schema. – mohammad mobasher Oct 30 '22 at 06:49
  • Where did you get the sqlboiler struct from? Sqlboiler created the struct by reading the DB schema of a DB. – guettli Oct 30 '22 at 20:38

0 Answers0