Separate out the utility methods for sqlcompletion to parseutils.