How to use the catalog/multiTableEntry function in catalog

To help you get started, we’ve selected a few catalog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalog.js View on Github external
.catch(error => {
          console.warn(error);
          deferred.resolve(
            new MultiTableEntry({ identifier: identifier, dataCatalog: self, paths: options.paths })
          );
        });
    }
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalog.js View on Github external
.then(storeEntry => {
          const entry = new MultiTableEntry({
            identifier: identifier,
            dataCatalog: self,
            paths: options.paths
          });
          if (storeEntry) {
            mergeMultiTableEntry(entry, storeEntry);
          }
          deferred.resolve(entry);
        })
        .catch(error => {
github cloudera / hue / desktop / core / src / desktop / js / catalog / dataCatalog.js View on Github external
getMultiTableEntry(options) {
    const self = this;
    const identifier = generateEntryCacheId(options);
    if (self.multiTableEntries[identifier]) {
      return self.multiTableEntries[identifier];
    }

    const deferred = $.Deferred();
    self.multiTableEntries[identifier] = deferred.promise();

    if (!cacheEnabled) {
      deferred
        .resolve(
          new MultiTableEntry({ identifier: identifier, dataCatalog: self, paths: options.paths })
        )
        .promise();
    } else {
      self.multiTableStore
        .getItem(identifier)
        .then(storeEntry => {
          const entry = new MultiTableEntry({
            identifier: identifier,
            dataCatalog: self,
            paths: options.paths
          });
          if (storeEntry) {
            mergeMultiTableEntry(entry, storeEntry);
          }
          deferred.resolve(entry);
        })