@Override
  public List<SQLUniqueConstraint> addUniqueConstraints(List<SQLUniqueConstraint> uks)
      throws InvalidObjectException, MetaException {
    uks = rawStore.addUniqueConstraints(uks);
    // in case of event based cache update, cache will be updated during commit.
    if (!canUseEvents && uks != null && !uks.isEmpty()) {
      String catName = normalizeIdentifier(uks.get(0).getCatName());
      String dbName = normalizeIdentifier(uks.get(0).getTable_db());
      String tblName = normalizeIdentifier(uks.get(0).getTable_name());
      if (!shouldCacheTable(catName, dbName, tblName)) {
        return uks;
      }
      sharedCache.addUniqueConstraintsToCache(catName, dbName, tblName, uks);
    }
    return uks;
  }
Method to fetch all table constraints at once
@param catName catalog name
@param dbName database name
@param tblName table name
@return list of all table constraints
@throws MetaException
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/cache/CachedStore.java