コード例 #1
0
func TestInsertStatement(t *testing.T) {
	relation := nodes.Relation("table")
	stmt := nodes.InsertStatement(relation)
	expected := `INSERT INTO "table" `
	if got, _ := sql.Accept(stmt); expected != got {
		t.Errorf("TestInsertStatement was expected to return %s, got %s", expected, got)
	}
}
コード例 #2
0
ファイル: insert_manager.go プロジェクト: smillaedler/codex
func Insertion(relation *nodes.RelationNode) (insertion *InsertManager) {
	insertion = new(InsertManager)
	insertion.Tree = nodes.InsertStatement(relation)
	return
}