github.com/gramework/gramework@v1.8.1-0.20231027140105-82555c9057f5/x/sqlgen/types.go (about)

     1  package sqlgen
     2  
     3  import (
     4  	"sync"
     5  )
     6  
     7  type (
     8  
     9  	// InsertBuilder defines internal implementation
    10  	// of a INSERT statement builder
    11  	InsertBuilder struct {
    12  		tableName string
    13  		query     string
    14  		columns   []string
    15  		sqlValues []string
    16  		prepared  bool
    17  		lock      *sync.Mutex
    18  	}
    19  
    20  	// CreateBuilder stands for the API
    21  	// of CREATE statement builder
    22  	CreateBuilder struct{}
    23  
    24  	// CreateDatabaseBuilder handles internal
    25  	// info about CREATE DATABASE statement
    26  	// that now builds
    27  	CreateDatabaseBuilder struct {
    28  		name  string
    29  		useIt bool
    30  	}
    31  
    32  	// CreateTableBuilder handles internal
    33  	// info about create table statement
    34  	// that now builds
    35  	CreateTableBuilder struct {
    36  		name    string
    37  		columns []tableColumn
    38  	}
    39  
    40  	// ColumnBuilder handles internal
    41  	// column info
    42  	ColumnBuilder struct {
    43  		name string
    44  		// sqlType      string
    45  		tableBuilder *CreateTableBuilder
    46  	}
    47  
    48  	tableColumn struct {
    49  		name    string
    50  		sqlType string
    51  	}
    52  )