Beispiel #1
0
        }
        <?php 
grokit\sql_parametric_end();
?>
;

    } else { // disk array is valid
#if 0
        printf("Opening Disk Array %ld: pageMultExp:%ld,\tnumberOfPages=%ld\n", meta.arrayID, meta.pageMultExp, meta.numberOfPages);
#endif
        // get the number of drives
        <?php 
grokit\sql_statement_scalar(<<<'EOT'
"
          SELECT COUNT(diskID)
          FROM Stripes
          WHERE arrayID=%d;
      "
EOT
, '_cnt', 'int', ['meta.arrayID']);
?>
;
        meta.HDNo = _cnt;
    }

    totalPages = 0;
    hds = new EventProcessor[meta.HDNo];

    // read the stripes from Stripes and start the HD threads
    <?php 
grokit\sql_statement_table(<<<'EOT'
"
Beispiel #2
0
}

//>

void FileMetadata::DeleteRelation(std::string name) {
<?php 
grokit\sql_open_database('GetMetadataDB() ');
?>

    uint64_t relID;
    const char * relName = name.c_str();
<?php 
grokit\sql_statement_scalar(<<<'EOT'
"
        SELECT COUNT(*)
        FROM Relations
        WHERE relName='%s';
"
EOT
, 'haveRel', 'int', ['relName']);
?>
;

    if (haveRel == 1 ) { // existing relation

<?php 
grokit\sql_statement_table(<<<'EOT'
"
        SELECT relID
        FROM Relations
          WHERE relName='%s';
"