Class: ImportDataPanel

parasql.ui.ImportDataPanel(optsopt)

new ImportDataPanel(optsopt)

The ImportDataPanel class is used to prompt the user through the data import process.
Parameters:
Name Type Attributes Description
opts Object <optional>
Various import options.
Properties
Name Type Attributes Description
importIntoTable string <optional>
The name of the table to import the data into.
disabled boolean <optional>
Prevent the user from changing any of the import options other than the file to import.
importAction string <optional>
Either: INSERT, INSERT_GENERATE_KEYS, UPDATE, or INSERT_ON_DUPLICATE_KEY_UPDATE.
columnMap Array <optional>
Maps column names in CSV file (source) to column names in selected table (target).
Properties
Name Type Attributes Description
obj Object <optional>
Object holding map properties.
Properties
Name Type Attributes Description
sourceColName string <optional>
column name in CSV file.
targetColName string <optional>
column name in target table.
delimiter string <optional>
Default is ',' but automatically set by sniffing file.
dateFormat string <optional>
Default is 'MM/DD/YYYY' valid options: 'MM/DD/YYYY', 'MM-DD-YYYY', 'DD/MM/YYYY', 'DD-MM-YYYY', 'DD.MM.YYYY', 'YYYY-MM-DD'.
timeFormat string <optional>
Default is 'HH:mm:ss' valid options: 'HH:mm:ss', 'HH:mm', 'hh:mm:ss AM', 'hh:mm AM'.
dateTimeFormat string <optional>
Default is 'MM/DD/YYYY HH:mm:ss' valid options: 'MM/DD/YYYY HH:mm:ss', 'MM-DD-YYYY HH:mm:ss', 'DD/MM/YYYY HH:mm:ss', 'DD-MM-YYYY HH:mm:ss', 'YYYY-MM-DD HH:mm:ss'.
decimalSeparator string <optional>
Default is '.' valid options: '.', ','.
Since:
  • v66
Example
var opts = {
	importIntoTable:'Customers',
	importAction:'INSERT',
	disabled: true,
	columnMap: [
		{sourceColName:'Customer_ID', targetColName:'Customer_ID'},
		{sourceColName:'Name', targetColName:'Customer_Name'},
		{sourceColName:'Address', targetColName:'Customer_Address'} 
	]   
};
new parasql.ui.ImportDataPanel(opts).show();

Extends

  • parasql.ui.ModalPanel