public int insertFromScan ( Scan s ) { if ( ! super . insertIntoNextEmptySlot ( ) ) { return 0 ; } for ( String fldName : sch . fields ( ) ) { Constant val = s . getVal ( fldName ) ; this . setVal ( fldName , val ) ; } if ( s . next ( ) ) return 1 ; else return - 1 ; }
Insert records to TempRecordFile for sorting at most one block long