Remove unused code.
This commit is contained in:
parent
c0710bed29
commit
7f54036b1a
1 changed files with 5 additions and 35 deletions
|
|
@ -24,7 +24,6 @@ func newInsertStatement(table Table, columns []jet.Column) InsertStatement {
|
||||||
newInsert.SerializerStatement = jet.NewStatementImpl(Dialect, jet.InsertStatementType, newInsert,
|
newInsert.SerializerStatement = jet.NewStatementImpl(Dialect, jet.InsertStatementType, newInsert,
|
||||||
&newInsert.Insert,
|
&newInsert.Insert,
|
||||||
&newInsert.ValuesQuery,
|
&newInsert.ValuesQuery,
|
||||||
&newInsert.OnDuplicateKey,
|
|
||||||
&newInsert.DefaultValues,
|
&newInsert.DefaultValues,
|
||||||
&newInsert.OnConflict,
|
&newInsert.OnConflict,
|
||||||
&newInsert.Returning,
|
&newInsert.Returning,
|
||||||
|
|
@ -42,7 +41,6 @@ type insertStatementImpl struct {
|
||||||
|
|
||||||
Insert jet.ClauseInsert
|
Insert jet.ClauseInsert
|
||||||
ValuesQuery jet.ClauseValuesQuery
|
ValuesQuery jet.ClauseValuesQuery
|
||||||
OnDuplicateKey onDuplicateKeyUpdateClause
|
|
||||||
DefaultValues jet.ClauseOptional
|
DefaultValues jet.ClauseOptional
|
||||||
OnConflict onConflictClause
|
OnConflict onConflictClause
|
||||||
Returning jet.ClauseReturning
|
Returning jet.ClauseReturning
|
||||||
|
|
@ -65,11 +63,6 @@ func (is *insertStatementImpl) MODELS(data interface{}) InsertStatement {
|
||||||
return is
|
return is
|
||||||
}
|
}
|
||||||
|
|
||||||
func (is *insertStatementImpl) ON_DUPLICATE_KEY_UPDATE(assigments ...ColumnAssigment) InsertStatement {
|
|
||||||
is.OnDuplicateKey = assigments
|
|
||||||
return is
|
|
||||||
}
|
|
||||||
|
|
||||||
func (is *insertStatementImpl) QUERY(selectStatement SelectStatement) InsertStatement {
|
func (is *insertStatementImpl) QUERY(selectStatement SelectStatement) InsertStatement {
|
||||||
is.ValuesQuery.Query = selectStatement
|
is.ValuesQuery.Query = selectStatement
|
||||||
return is
|
return is
|
||||||
|
|
@ -85,29 +78,6 @@ func (is *insertStatementImpl) RETURNING(projections ...jet.Projection) InsertSt
|
||||||
return is
|
return is
|
||||||
}
|
}
|
||||||
|
|
||||||
type onDuplicateKeyUpdateClause []jet.ColumnAssigment
|
|
||||||
|
|
||||||
// Serialize for SetClause
|
|
||||||
func (s onDuplicateKeyUpdateClause) Serialize(statementType jet.StatementType, out *jet.SQLBuilder, options ...jet.SerializeOption) {
|
|
||||||
if len(s) == 0 {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
out.NewLine()
|
|
||||||
out.WriteString("ON DUPLICATE KEY UPDATE")
|
|
||||||
out.IncreaseIdent(24)
|
|
||||||
|
|
||||||
for i, assigment := range s {
|
|
||||||
if i > 0 {
|
|
||||||
out.WriteString(",")
|
|
||||||
out.NewLine()
|
|
||||||
}
|
|
||||||
|
|
||||||
jet.Serialize(assigment, statementType, out, jet.ShortName.WithFallTrough(options)...)
|
|
||||||
}
|
|
||||||
|
|
||||||
out.DecreaseIdent(24)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (is *insertStatementImpl) ON_CONFLICT(indexExpressions ...jet.ColumnExpression) onConflict {
|
func (is *insertStatementImpl) ON_CONFLICT(indexExpressions ...jet.ColumnExpression) onConflict {
|
||||||
is.OnConflict = onConflictClause{
|
is.OnConflict = onConflictClause{
|
||||||
insertStatement: is,
|
insertStatement: is,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue