MCPcopy Index your code
hub / github.com/dropbox/godropbox / TestInsertMultipleValues

Method TestInsertMultipleValues

database/sqlbuilder/statement_test.go:301–314  ·  view source on GitHub ↗
(c *gc.C)

Source from the content-addressed store, hash-verified

299}
300
301func (s *StmtSuite) TestInsertMultipleValues(c *gc.C) {
302 stmt := table1.Insert(table1Col1, table1Col2, table1Col3)
303 stmt.Add(Literal(1), Literal(2), Literal(3))
304
305 sql, err := stmt.String("db")
306 c.Assert(err, gc.IsNil)
307
308 c.Assert(
309 sql,
310 gc.Equals,
311 "INSERT INTO `db`.`table1` "+
312 "(`table1`.`col1`,`table1`.`col2`,`table1`.`col3`) "+
313 "VALUES (1,2,3)")
314}
315
316func (s *StmtSuite) TestInsertMultipleRows(c *gc.C) {
317 stmt := table1.Insert(table1Col1, table1Col2)

Callers

nothing calls this directly

Calls 4

LiteralFunction · 0.85
InsertMethod · 0.65
AddMethod · 0.65
StringMethod · 0.65

Tested by

no test coverage detected