<commit_before>//
// Copyright (c) XSharp B.V.  All Rights Reserved.  
// Licensed under the Apache License, Version 2.0.  
// See License.txt in the project root for license information.
//
USING XSharp.RDD.Enums
/// <summary>Definition for the interface that each RDD must implement</summary>
/// <seealso cref="T:XSharp.Workarea"/>
INTERFACE XSharp.RDD.IRdd
	// Navigation         
	/// <summary>Evaluate a code block for each row.</summary>
	/// <param name="info">object containing the information about which rows to visit.</param>
	METHOD DbEval(info AS DbEvalInfo)		AS LOGIC
	/// <summary>Position the cursor to the first logical row.</summary>
	METHOD GoTop()							AS LOGIC
	/// <summary>Position the cursor to the last logical row.</summary>
	METHOD GoBottom()						AS LOGIC   
	/// <summary>Position the cursor to a specific, physical row.</summary>
	/// <param name="nRec">The row number of the new cursor position.</param>
	METHOD GoTo(nRec AS LONG)				AS LOGIC
	/// <summary>Position the cursor to a specific, physical identity.</summary>
	/// <param name="oRec">The row ID of the new cursor position.</param>
	METHOD GoToId(oRec AS OBJECT)			AS LOGIC
	/// <summary>Position the cursor relative to its current position.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD Skip(nToSkip AS INT)				AS LOGIC
	/// <summary>Position the cursor, respecting scope and filter conditions.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipFilter(nToSkip AS INT)		AS LOGIC
	/// <summary>Position the cursor regardless of scope and filter conditions.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipRaw(nToSkip AS INT)			AS LOGIC 
	/// <summary>Position the cursor relative to its current position within the current scope.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipScope(nToSkip AS INT)		AS LOGIC

	// Append and Delete
	/// <summary>Append a blank row and position the cursor to the new row.</summary>
	/// <param name="lReleaseLock">A flag that is TRUE if you want to clear all pending row locks before appending the new row and FALSE if you want to add the new row to the end of the current lock list.</param>
	METHOD Append(lReleaseLock AS LOGIC)	AS LOGIC
	/// <summary>Mark the row at the current cursor position for deletion.</summary>
	METHOD Delete()							AS LOGIC   
	/// <summary>Retrieve the RDD's record buffer as array of bytes.</summary>
	METHOD GetRec()							AS BYTE[]  
	/// <summary>Physically remove rows marked for deletion.</summary>
	METHOD Pack()							AS LOGIC
	/// <summary>Replace the row at the current cursor position with the contents of a byte array.</summary>
	/// <param name="aRec">The buffer containing the information that you want to write.</param>
	/// <note>The buffer should have at least the # of bytes that matches the current record size.</note>
	METHOD PutRec(aRec AS BYTE[])			AS LOGIC 
	/// <summary>Remove the deletion marker from the row at the current cursor position.</summary>
	METHOD Recall()							AS LOGIC
	/// <summary>Physically remove all rows from a table.</summary>
	METHOD Zap()							AS LOGIC   
		
	// Open and Close   
	/// <summary>Close a table.</summary>
	METHOD Close() 							AS LOGIC  
	/// <summary>Create a table.</summary>
	/// <param name="info">object describing the file to create.</param>
	METHOD Create(info AS DbOpenInfo)		AS LOGIC  
	/// <summary>Open a table.</summary>
	/// <param name="info">object describing the file to open.</param>
	METHOD Open(info AS DbOpenInfo)			AS LOGIC
		
	// Filtering and Scoping 
	/// <summary>Clear the active filter condition.</summary>
	METHOD ClearFilter() 					AS LOGIC
	/// <summary>Clear the active locate condition.</summary>
	METHOD ClearScope() 					AS LOGIC 
	/// <summary>Goto the next record based on the corrent locate condition.</summary>
	METHOD Continue()						AS LOGIC     
	//METHOD CountScope(pOpt as PTR)		AS LONG 
	/// <summary>Retrieve the active locate condition.</summary>
	METHOD GetScope()						AS DbScopeInfo 
	/// <summary>Retrieve information about a scope.</summary>
	/// <param name="nOrdinal"> A value that determines the type of information to retrieve.</param>
	METHOD ScopeInfo(nOrdinal AS LONG)		AS OBJECT
	/// <summary>Set the filter condition.</summary>
	METHOD SetFilter(info AS DbFilterInfo)	AS LOGIC 
	/// <summary>Set the locate condition.</summary>
	/// <param name="info">object  containing the scope information.</param>
	METHOD SetScope(info AS DbScopeInfo)	AS LOGIC
		
	// Fields                          
	/// <summary>Add a column.</summary>
	METHOD AddField(info AS DbFieldInfo)	AS LOGIC
	/// <summary>Add columns defined in an array.</summary>
	METHOD CreateFields(aFields AS RddFieldInfo[]) AS LOGIC
	/// <summary>Return the ONE based field index for a field name.</summary>
	METHOD FieldIndex(fieldName AS STRING)	AS LONG 
	/// <summary>Retrieve and optionally change information about a column.</summary>
	METHOD FieldInfo(nFldPos AS LONG, nOrdinal AS LONG, oNewValue AS OBJECT) AS OBJECT
	/// <summary>Retrieve a column name based on its ONE based column number.</summary>
	/// <param name="nFldPos">The ONE based number of the column whose name you want to obtain.</param>
	METHOD FieldName(nFldPos AS LONG)		AS STRING 
	// Read & Write		
	/// <summary>Get a value for the specified column.</summary>	
	/// <param name="nFldPos">1 based column number for which the value should be retrieved.</param><commit_msg>Correction on AddField prototype<commit_after>//
// Copyright (c) XSharp B.V.  All Rights Reserved.  
// Licensed under the Apache License, Version 2.0.  
// See License.txt in the project root for license information.
//
USING XSharp.RDD.Enums
/// <summary>Definition for the interface that each RDD must implement</summary>
/// <seealso cref="T:XSharp.Workarea"/>
INTERFACE XSharp.RDD.IRdd
	// Navigation         
	/// <summary>Evaluate a code block for each row.</summary>
	/// <param name="info">object containing the information about which rows to visit.</param>
	METHOD DbEval(info AS DbEvalInfo)		AS LOGIC
	/// <summary>Position the cursor to the first logical row.</summary>
	METHOD GoTop()							AS LOGIC
	/// <summary>Position the cursor to the last logical row.</summary>
	METHOD GoBottom()						AS LOGIC   
	/// <summary>Position the cursor to a specific, physical row.</summary>
	/// <param name="nRec">The row number of the new cursor position.</param>
	METHOD GoTo(nRec AS LONG)				AS LOGIC
	/// <summary>Position the cursor to a specific, physical identity.</summary>
	/// <param name="oRec">The row ID of the new cursor position.</param>
	METHOD GoToId(oRec AS OBJECT)			AS LOGIC
	/// <summary>Position the cursor relative to its current position.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD Skip(nToSkip AS INT)				AS LOGIC
	/// <summary>Position the cursor, respecting scope and filter conditions.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipFilter(nToSkip AS INT)		AS LOGIC
	/// <summary>Position the cursor regardless of scope and filter conditions.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipRaw(nToSkip AS INT)			AS LOGIC 
	/// <summary>Position the cursor relative to its current position within the current scope.</summary>
	/// <param name="nToSkip">The number of rows to skip.  If this argument is positive, the cursor moves forward (toward the end-of-file).  If it is negative, the cursor moves backward (toward the beginning-of-file).</param>
	METHOD SkipScope(nToSkip AS INT)		AS LOGIC

	// Append and Delete
	/// <summary>Append a blank row and position the cursor to the new row.</summary>
	/// <param name="lReleaseLock">A flag that is TRUE if you want to clear all pending row locks before appending the new row and FALSE if you want to add the new row to the end of the current lock list.</param>
	METHOD Append(lReleaseLock AS LOGIC)	AS LOGIC
	/// <summary>Mark the row at the current cursor position for deletion.</summary>
	METHOD Delete()							AS LOGIC   
	/// <summary>Retrieve the RDD's record buffer as array of bytes.</summary>
	METHOD GetRec()							AS BYTE[]  
	/// <summary>Physically remove rows marked for deletion.</summary>
	METHOD Pack()							AS LOGIC
	/// <summary>Replace the row at the current cursor position with the contents of a byte array.</summary>
	/// <param name="aRec">The buffer containing the information that you want to write.</param>
	/// <note>The buffer should have at least the # of bytes that matches the current record size.</note>
	METHOD PutRec(aRec AS BYTE[])			AS LOGIC 
	/// <summary>Remove the deletion marker from the row at the current cursor position.</summary>
	METHOD Recall()							AS LOGIC
	/// <summary>Physically remove all rows from a table.</summary>
	METHOD Zap()							AS LOGIC   
		
	// Open and Close   
	/// <summary>Close a table.</summary>
	METHOD Close() 							AS LOGIC  
	/// <summary>Create a table.</summary>
	/// <param name="info">object describing the file to create.</param>
	METHOD Create(info AS DbOpenInfo)		AS LOGIC  
	/// <summary>Open a table.</summary>
	/// <param name="info">object describing the file to open.</param>
	METHOD Open(info AS DbOpenInfo)			AS LOGIC
		
	// Filtering and Scoping 
	/// <summary>Clear the active filter condition.</summary>
	METHOD ClearFilter() 					AS LOGIC
	/// <summary>Clear the active locate condition.</summary>
	METHOD ClearScope() 					AS LOGIC 
	/// <summary>Goto the next record based on the corrent locate condition.</summary>
	METHOD Continue()						AS LOGIC     
	//METHOD CountScope(pOpt as PTR)		AS LONG 
	/// <summary>Retrieve the active locate condition.</summary>
	METHOD GetScope()						AS DbScopeInfo 
	/// <summary>Retrieve information about a scope.</summary>
	/// <param name="nOrdinal"> A value that determines the type of information to retrieve.</param>
	METHOD ScopeInfo(nOrdinal AS LONG)		AS OBJECT
	/// <summary>Set the filter condition.</summary>
	METHOD SetFilter(info AS DbFilterInfo)	AS LOGIC 
	/// <summary>Set the locate condition.</summary>
	/// <param name="info">object  containing the scope information.</param>
	METHOD SetScope(info AS DbScopeInfo)	AS LOGIC
		
	// Fields                          
	/// <summary>Add a column.</summary>
	METHOD AddField(info AS RddFieldInfo)	AS LOGIC
	/// <summary>Add columns defined in an array.</summary>
	METHOD CreateFields(aFields AS RddFieldInfo[]) AS LOGIC
	/// <summary>Return the ONE based field index for a field name.</summary>
	METHOD FieldIndex(fieldName AS STRING)	AS LONG 
	/// <summary>Retrieve and optionally change information about a column.</summary>
	METHOD FieldInfo(nFldPos AS LONG, nOrdinal AS LONG, oNewValue AS OBJECT) AS OBJECT
	/// <summary>Retrieve a column name based on its ONE based column number.</summary>
	/// <param name="nFldPos">The ONE based number of the column whose name you want to obtain.</param>
	METHOD FieldName(nFldPos AS LONG)		AS STRING 
	// Read & Write		
	/// <summary>Get a value for the specified column.</summary>	
	/// <param name="nFldPos">1 based column number for which the value should be retrieved.</param>
{'fraction_non_alphanumeric': 0.10729891568214922, 'fraction_numerical': 0.0004855154555753358, 'mean_word_length': 3.494181818181818, 'pattern_counts': {'":': 0, '<': 201, '<?xml version=': 0, '>': 201, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7226258', 'n_tokens_mistral': 3687, 'n_tokens_neox': 3455, 'n_words': 1472}