library/src/databases/bpdb/BP-DB.cc
// looks up the columns table for a given table name.  This is the keyed entry for the
// tables/specific_table/columns/ path.
looks up the columns table for a given table name.  This is the keyed entry for the
tables/specific_table/columns/ path.
looks up the columns table for a given table name . This is the keyed entry for the tables / specific_table / columns / path .
P_BP_HASH_TABLE_KEYED_ENTRY BP_DBLookupTableColumns(P_BPDB bpdb, char *table_name)
{
	if(!table_name)
		return NULL;
	if(!BP_StringIsReasonableForTableNameDB(table_name, bpstrlen(table_name)))
		return NULL;
	char * path[10];
	BP_ZERO_STACK(path);
	path[0] = "tables";
	path[1] = table_name;
	path[2] = "columns";
	path[3] = NULL;
	P_BP_HASH_TABLE_KEYED_ENTRY columns = (P_BP_HASH_TABLE_KEYED_ENTRY) BP_HashRegLookupTableByPath(bpdb->system_hreg, (char **) &path);
	return columns;
}
P_BP_HASH_TABLE_KEYED_ENTRY BP_DBLookupTableColumns ( P_BPDB bpdb , char * table_name ) { if ( ! table_name ) return NULL ; if ( ! BP_StringIsReasonableForTableNameDB ( table_name , bpstrlen ( table_name ) ) ) return NULL ; char * path [ 10 ] ; BP_ZERO_STACK ( path ) ; path [ 0 ] = " " ; path [ 1 ] = table_name ; path [ 2 ] = " " ; path [ 3 ] = NULL ; P_BP_HASH_TABLE_KEYED_ENTRY columns = ( P_BP_HASH_TABLE_KEYED_ENTRY ) BP_HashRegLookupTableByPath ( bpdb -> system_hreg , ( char * * ) & path ) ; return columns ; }
looks up the columns table for a given table name.
looks up the columns table for a given table name .
// ensure we have a table name // ensure name is reasonable for table // create table columns path stack // set lookup path // lookup table // column, or null if unfound