Check through a plan graph and return true if it ever touches a persistent table.
969773
static boolean fragmentReferencesPersistentTable(AbstractPlanNode node) {
        if (node == null)
            return false;

        // these nodes can read/modify persistent tables
        if (node instanceof AbstractScanPlanNode)
            return true;
        if (node instanceof InsertPlanNode)
            return true;
        if (node instanceof DeletePlanNode)
            return true;
        if (node instanceof UpdatePlanNode)
            return true;

        // recursively check out children
        for (int i = 0; i < node.getChildCount(); i++) {
            AbstractPlanNode child = node.getChild(i);
            if (fragmentReferencesPersistentTable(child))
                return true;
        }

        // if nothing found, return false
        return false;
    }
431990
def has_activity(graph: BELGraph, node: BaseEntity) -> bool:
    """"""
    return _node_has_modifier(graph, node, ACTIVITY)
959719
def has_table(self, name):
        """"""
        return len(self.sql("SELECT name FROM sqlite_master WHERE type='table' AND name=?",
                            parameters=(name,), asrecarray=False, cache=False)) > 0
1070933
private boolean containsInterval(Interval i) {
        if (i != null) {
            return directedGraph.contains(i.getStart())
                    && directedGraph.contains(i.getFinish());
        } else {
            return false;
        }
    }
818860
public boolean has(String tableName, String columnName) {
		return has(EXTENSION_NAME, tableName, columnName)
				&& connection.tableExists(getRTreeTableName(tableName,
						columnName));
	}
234357
def check_keypoints(keypoints, rows, cols):
    """"""
    for kp in keypoints:
        check_keypoint(kp, rows, cols)
1311857
def table_exists(self, table):
        
        if not self.dataset_exists(table.dataset):
            return False

        try:
            self.client.tables().get(projectId=table.project_id,
                                     datasetId=table.dataset_id,
                                     tableId=table.table_id).execute()
        except http.HttpError as ex:
            if ex.resp.status == 404:
                return False
            raise

        return True
928963
void checkReferencedRows(Session session, Table table, int[] rowColArray) {

        Index           mainIndex = getMainIndex();
        PersistentStore store     = session.sessionData.getRowStore(table);
        RowIterator     it        = table.rowIterator(session);

        while (true) {
            Row row = it.getNextRow();

            if (row == null) {
                break;
            }

            Object[] rowData = row.getData();

            if (ArrayUtil.hasNull(rowData, rowColArray)) {
                if (core.matchType == OpTypes.MATCH_SIMPLE) {
                    continue;
                }
            } else if (mainIndex.exists(session, store, rowData,
                                        rowColArray)) {
                continue;
            }

            if (ArrayUtil.hasAllNull(rowData, rowColArray)) {
                continue;
            }

            String colValues = "";

            for (int i = 0; i < rowColArray.length; i++) {
                Object o = rowData[rowColArray[i]];

                colValues += table.getColumnTypes()[i].convertToString(o);
                colValues += ",";
            }

            String[] info = new String[] {
                getName().name, getMain().getName().name
            };

            throw Error.error(ErrorCode.X_23502, ErrorCode.CONSTRAINT, info);
        }
    }
574740
def _HasTable(self, table_name):
    
    query = self._HAS_TABLE_QUERY.format(table_name)

    self._cursor.execute(query)
    return bool(self._cursor.fetchone())
1224939
private void checkPersistedSNS(NodeData node, WorkspaceStorageConnection acon) throws RepositoryException
   {
      NodeData parent = (NodeData)acon.getItemData(node.getParentIdentifier());
      QPathEntry myName = node.getQPath().getEntries()[node.getQPath().getEntries().length - 1];
      ItemData sibling =
         acon.getItemData(parent, new QPathEntry(myName.getNamespace(), myName.getName(), myName.getIndex() - 1),
            ItemType.NODE);

      if (sibling == null || !sibling.isNode())
      {
         throw new InvalidItemStateException("Node can't be saved " + node.getQPath().getAsString()
            + ". No same-name sibling exists with index " + (myName.getIndex() - 1) + ".");
      }
   }
1221712
def health_check(self):
        """"""
        logger.debug('Health Check on Table: {namespace}'.format(
            namespace=self.namespace
        ))

        try:
            self.get_all()
            return True

        except ClientError as e:
            logger.exception(e)
            logger.error('Error encountered with Database. Assume unhealthy')
            return False
999567
def _plan_on_valid_line(self, at_line, final_line_count):
        """"""
        # Put the common cases first.
        if at_line == 1 or at_line == final_line_count:
            return True

        # The plan may only appear on line 2 if the version is at line 1.
        after_version = (
            self._lines_seen["version"]
            and self._lines_seen["version"][0] == 1
            and at_line == 2
        )
        if after_version:
            return True

        return False
596222
def exists(self, table_id):
        
        from google.api_core.exceptions import NotFound

        table_ref = self.client.dataset(self.dataset_id).table(table_id)
        try:
            self.client.get_table(table_ref)
            return True
        except NotFound:
            return False
        except self.http_error as ex:
            self.process_http_error(ex)
1206803
def __check_existing(self, row):
        
        if self.__update_keys is not None:
            key = tuple(row[key] for key in self.__update_keys)
            if key in self.__bloom:
                return True
            self.__bloom.add(key)
            return False
        return False
242639
function doesPathExist(pathToVerify) {
    let pathExists = true;

    try {
        fs.accessSync(pathToVerify);
    } catch (error) {
        pathExists = false;
    }

    return pathExists;
}
583558
public boolean tick (Pathable pable, long tickStamp)
    {
        if (pable != _pable) {
            log.warning("PathSequence ticked with different path than it was inited with.");
        }
        return _curPath.tick(_pableRep, tickStamp);
    }
1301925
protected static function _tableExists()
    {
        $db = ConnectionManager::get('default');
        $tables = $db->schemaCollection()->listTables();

        if (in_array('settings_configurations', $tables)) {
            return true;
        }
        return false;
    }