Sha256: acd96a80e42daa1e5efc0f929d1eb9b1680902620e848a7374e43f52c6127774

Contents?: true

Size: 1.76 KB

Versions: 14

Compression:

Stored size: 1.76 KB

Contents

!(angular => {
  'use strict';

  let filters = {
    tableRestrictionMet(item, filterArgs) {
      return ((filterArgs.tableRestrict.length === 0) ||  _.contains(filterArgs.tableRestrict, item.table));
    },
    schemaRestrictionMet(item, filterArgs) {
      return ((filterArgs.schemaRestrict.length === 0) || _.contains(filterArgs.schemaRestrict, item.schema));
    }
  };

  angular
    .module('aleph.schemaCompleterConfig', [])

    .constant('SCHEMA_MATCHERS', [
        {
          nameProperty: 'schema',
          meta: 'schema',
          contextRelevance: {
            from: 1000
          }
        },
        {
          nameProperty: 'column',
          meta: 'column',
          contextRelevance: {
            select: 1000,
            from: 500,
            where: 1000
          },
          contextItemFilters: {
            select: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            from: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            where: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ]
          }
        },
        {
          nameProperty: 'table',
          meta: 'table',
          contextRelevance: {
            select: 500,
            from: 1000,
            where: 500
          },
          contextItemFilters: {
            select: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ],
            from: [
              filters.schemaRestrictionMet
            ],
            where: [
              filters.schemaRestrictionMet,
              filters.tableRestrictionMet
            ]
          }
        }
      ]);

}(angular));

Version data entries

14 entries across 7 versions & 1 rubygems

Version Path
aleph_analytics-0.0.6 public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.6 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.5 public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.5 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.4 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.4 public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.3 public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.3 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.2 public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.2 app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.1.alpha public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6
aleph_analytics-0.0.1.alpha app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.0.alpha app/assets/javascripts/angular/config/schema_completer_config.js.es6
aleph_analytics-0.0.0.alpha public/assets/angular/config/schema_completer_config.js-1b696920b5e04f75620630d75117b201.es6