jet/mysql/lock_statement_test.go

22 lines
367 B
Go
Raw Normal View History

package mysql
import "testing"
func TestLockRead(t *testing.T) {
2019-08-12 12:11:16 +02:00
assertStatementSql(t, table2.LOCK().READ(), `
LOCK TABLES db.table2 READ;
`)
}
func TestLockWrite(t *testing.T) {
2019-08-12 12:11:16 +02:00
assertStatementSql(t, table2.LOCK().WRITE(), `
LOCK TABLES db.table2 WRITE;
`)
}
func TestUNLOCK_TABLES(t *testing.T) {
2019-08-12 12:11:16 +02:00
assertStatementSql(t, UNLOCK_TABLES(), `
UNLOCK TABLES;
`)
}