...

Package query

import "cloud.google.com/go/bigquery/internal/query"
Overview
Index

Overview ▾

func HasOrderedResults

func HasOrderedResults(sql string) bool

HasOrderedResults checks if a given SQL query returns ordered results. This function uses a naive approach of checking the root level query ( ignoring subqueries, functions calls, etc ) and checking if it contains an ORDER BY clause.