- },
- oneditprepare: function () {
- if (this.parseMustache === undefined) {
- this.parseMustache = true;
- $('#node-input-parseMustache').prop('checked', true);
- }
- const node = this;
- //ensure node.query is a string otherwise editor wont initialise
- if (typeof node.query !== 'string') node.query = '';
- //create the query editor
- this.editor = RED.editor.createEditor({
- id: 'node-sql-query-editor',
- mode: 'ace/mode/sql',
- value: node.query // $("#node-input-query").val()
- });
- //create typedInput widgets
- const modeField = $('#node-input-modeOpt').typedInput({
- types: [
- { value: 'query', label: this._('mssql.common.query'), hasValue: false },
- { value: 'execute', label: this._('mssql.common.execute_procedure'), hasValue: false },
- //FUTURE: { value:"prepared", label: "Prepared Statement", hasValue:false },