Skip to content

Commit

Permalink
Remove the old SQLClause
Browse files Browse the repository at this point in the history
  • Loading branch information
cdevienne committed Sep 5, 2016
1 parent 47a379d commit 67be086
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions clause.go
@@ -1,25 +1,11 @@
package qb

// Clause is the base interface of all clauses that will get
// compiled to SQL by Compiler
type Clause interface {
Accept(context *CompilerContext) string
}

// Compiles is the standard interface for any compilable sql clause
// Compiling means to post process any sql clauses if needed such as escaping, putting placeholders, etc.
type Compiles interface {
// Build is the key function of any sql clause
// It returns sql as string and bindings as []interface{}
Build(dialect Dialect) (string, []interface{})
}

// SQLClause is the key interface for any sql clause
type SQLClause interface {
Compiles
// String returns the dialect agnostic sql clause and bindings.
// It returns variable name as placeholders instead of $n or ?.
//String() (string, []interface{})
}

// TableSQLClause is the common interface for ddl generators such as Column(), PrimaryKey(), ForeignKey().Ref(), etc.
type TableSQLClause interface {
// String takes the dialect and returns the ddl as an sql string
Expand Down

0 comments on commit 67be086

Please sign in to comment.