(from string, where *SqlWhere)
| 1894 | func (m *SqlUpdate) SqlSelect() *SqlSelect { return sqlSelectFromWhere(m.Table, m.Where) } |
| 1895 | |
| 1896 | func sqlSelectFromWhere(from string, where *SqlWhere) *SqlSelect { |
| 1897 | req := NewSqlSelect() |
| 1898 | req.From = []*SqlSource{NewSqlSource(from)} |
| 1899 | switch { |
| 1900 | case where.Expr != nil: |
| 1901 | req.Where = NewSqlWhere(where.Expr) |
| 1902 | default: |
| 1903 | req.Where = where |
| 1904 | } |
| 1905 | |
| 1906 | req.Star = true |
| 1907 | req.Columns = starCols |
| 1908 | return req |
| 1909 | } |
| 1910 | |
| 1911 | func (m *SqlDelete) Keyword() lex.TokenType { return lex.TokenDelete } |
| 1912 | func (m *SqlDelete) String() string { return fmt.Sprintf("%s ", m.Keyword()) } |
no test coverage detected