diff --git a/app/components/schema-table.js b/app/components/schema-table.js index bd245bcb..21ebc265 100644 --- a/app/components/schema-table.js +++ b/app/components/schema-table.js @@ -24,8 +24,11 @@ export default class SchemaTableComponent extends PaginatedTable { this.table = Table.create({ columns: this.columns }); if (!this.args.isNested) { this.sortBy('name', 'ascending'); + this.addPages(2); + } else { + // Add everything if nested + this.addRows(0, this.numberOfRows); } - this.addPages(2); } static fieldsToRows(fields) { diff --git a/app/utils/builder-adapter.js b/app/utils/builder-adapter.js index d99c7855..e5f1c1ad 100644 --- a/app/utils/builder-adapter.js +++ b/app/utils/builder-adapter.js @@ -447,12 +447,18 @@ export function addQueryBuilderRules(element, rules, bql) { * @param {function} validateHook The hook to invoke for validation when something changes in the QueryBuilder. */ export function addQueryBuilderHooks(element, context, dirtyHook, validateHook) { - element.on('rulesChanged.queryBuilder', bind(context, dirtyHook)); - let event = [ + let subFieldChanged = 'afterUpdateRuleSubfield.queryBuilder'; + let dirtyEvents = [ + 'rulesChanged.queryBuilder', + subFieldChanged + ]; + element.on(dirtyEvents.join(' '), bind(context, dirtyHook)); + + let validateEvents = [ 'afterUpdateRuleFilter.queryBuilder', 'afterUpdateRuleOperator.queryBuilder', - 'afterUpdateRuleSubfield.queryBuilder', + subFieldChanged, 'afterUpdateRuleValue.queryBuilder' ]; - element.on(event.join(' '), bind(context, validateHook)); + element.on(validateEvents.join(' '), bind(context, validateHook)); } diff --git a/app/utils/codemirror-adapter.js b/app/utils/codemirror-adapter.js index 31eae5fe..a3690cb7 100644 --- a/app/utils/codemirror-adapter.js +++ b/app/utils/codemirror-adapter.js @@ -28,12 +28,13 @@ export function defineBQL() { name: 'sql', keywords: set('select as cast count distinct sum min max avg from where if and or not xor is all any true false ' + 'null group by having order asc desc limit every first time record linear region manual stream ' + - 'windowing tumbling quantile freq cumfreq top sizeis sizeof filter rlike containskey containsvalue'), + 'windowing tumbling quantile freq cumfreq top sizeis sizeof filter rlike containskey containsvalue ' + + 'lateral view outer explode trim abs between substr substring unixtimestamp'), builtin: set('string boolean integer long float double map list'), atoms: set('false true null'), operatorChars: /^[*+\-/%<>!=&|^]/, dateSQL: { }, - support: set('zerolessFloat doubleQuote commentHash commentSlashSlash') + support: set('ODBCdotTable zerolessFloat doubleQuote commentHash commentSlashSlash') }); }