MXUnit 2.1.3 (Generated: 09/27/2012)

mxunit.framework
Class CSVUtility

WEB-INF.cftags.component
        extended by mxunit.framework.CSVUtility

public class CSVUtility
extends WEB-INF.cftags.component

simple utility for creating query from a CSV file. This is meant as a testing utility, not as a bullet-proof component for production code


Method Summary
private string getColumnList(string csvRow, any isHeaderRow, any columnDelimiter)
 struct readCSV(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter=' '], [string columnDelimiter=','])
          converts a CSV File into a Query
 array readCSVToArray(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter=' '], [string columnDelimiter=','])
          returns a 2D array of data
 
Methods inherited from class WEB-INF.cftags.component
 

Method Detail

getColumnList

private string getColumnList(string csvRow, any isHeaderRow, any columnDelimiter)

Parameters:
csvRow
isHeaderRow
columnDelimiter

readCSV

public struct readCSV(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter=' '], [string columnDelimiter=','])
converts a CSV File into a Query

Parameters:
filePath - full path to file
hasHeaderRow - whether the first row is a header row. If so, the values in the first row will be used as column names; otherwise, columns will be derived
rowDelimiter - string used to delimit rows. chr(10) is default
columnDelimiter - string used to delimit columns; ',' is default

readCSVToArray

public array readCSVToArray(string filePath, [boolean hasHeaderRow='false'], [string rowDelimiter=' '], [string columnDelimiter=','])
returns a 2D array of data

Parameters:
filePath - full path to file
hasHeaderRow - whether the first row is a header row. If so, the values in the first row will be used as column names; otherwise, columns will be derived
rowDelimiter - string used to delimit rows. chr(10) is default
columnDelimiter - string used to delimit columns; ',' is default

MXUnit 2.1.3 (Generated: 09/27/2012)