//ToSQL converts the the query to a sql query
ToSQL converts the the query to a sql query
// ToSQL converts the the query to a sql query
func (q Query) ToSQL() (*SQLQuery, error) {
	if len(q.Tables) == 0 {
		return nil, errors.New("couldn't find any tables")
	}
	if len(q.Tables) == 1 {
		return q.ToSingleTableSQL()
	}
	return nil, errors.New("couldn't convert the query to sql as no of tables not suppoerted")
}
func ( q Query ) ToSQL ( ) ( * SQLQuery , error ) { if len ( q . Tables ) == 0 { return nil , errors . New ( " " ) } if len ( q . Tables ) == 1 { return q . ToSingleTableSQL ( ) } return nil , errors . New ( " " ) }
ToSQL converts the the query to a sql query
ToSQL converts the the query to a sql query
/*
	 * We will add check for zero table
	 * If the no of tables is one we will choose the single table query mode
	 */