コード例 #1
0
ファイル: cqlc.go プロジェクト: philipsoutham/cqlc
func (c *Context) Batch(b *gocql.Batch) error {
	stmt, placeHolders, err := BuildStatement(c)

	if err != nil {
		return err
	}

	if c.Debug {
		debugStmt(stmt, placeHolders)
	}

	b.Query(stmt, placeHolders...)

	return nil
}
コード例 #2
0
ファイル: cqlc.go プロジェクト: EverythingMe/cqlc
func (c *Context) Batch(b *gocql.Batch) error {
	stmt, placeHolders, err := BuildStatement(c)

	if err != nil {
		return err
	}

	if c.Debug {
		fmt.Printf("%+v bound to stmt: %s\n", placeHolders, stmt)
	}

	b.Query(stmt, placeHolders...)

	return nil
}