@Override
  public List<SQLDefaultConstraint> addDefaultConstraints(List<SQLDefaultConstraint> dcs)
      throws InvalidObjectException, MetaException {
    dcs = rawStore.addDefaultConstraints(dcs);
    // in case of event based cache update, cache will be updated during commit.
    if (!canUseEvents && CollectionUtils.isNotEmpty(dcs)) {
      String catName = normalizeIdentifier(dcs.get(0).getCatName());
      String dbName = normalizeIdentifier(dcs.get(0).getTable_db());
      String tblName = normalizeIdentifier(dcs.get(0).getTable_name());
      if (!shouldCacheTable(catName, dbName, tblName)) {
        return dcs;
      }
      sharedCache.addDefaultConstraintsToCache(catName, dbName, tblName, dcs);
    }
    return dcs;
  }
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