"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
//手动测试类
function selectTest1() {
    console.log("当前selectTest1：");
    let context = new _1.EditorContext();
    context.cpId = 1;
    context.dataBaseName = "employees";
    context.editorType = "sql";
    context.command = "select a from c";
    context.rangeOffset = 7;
    context.currentChar = "a";
    context.dataSourceName = "MYSQL";
    let parseResult = _1.EditorParser.parse(context);
    console.log("测试结果：");
    console.log(parseResult);
}
function selectTest2() {
    console.log("当前selectTest1：");
    let context = new _1.EditorContext();
    context.cpId = 1;
    context.dataBaseName = "employees";
    context.editorType = "sql";
    context.command = "select a";
    context.rangeOffset = 7;
    context.currentChar = "a";
    context.dataSourceName = "MYSQL";
    let parseResult = _1.EditorParser.parse(context);
    console.log("测试结果：");
    console.log(parseResult);
}
function insertTest() {
    console.log("当前insertTest：");
    let context = new _1.EditorContext();
    context.cpId = 1;
    context.dataBaseName = "world";
    context.editorType = "sql";
    context.command = "insert into c(ID,Name) values(1,2)";
    context.rangeOffset = 12;
    context.currentChar = "c";
    context.dataSourceName = "MYSQL";
    let parser = new _1.EditorParser();
    let completionRequest = _1.EditorParser.parse(context);
    if (completionRequest == undefined) {
        console.log("补全类型为undefined");
    }
    else {
        console.log(completionRequest);
    }
}
function updateTest() {
    console.log("当前updateTest：");
    let context = new _1.EditorContext();
    context.cpId = 1;
    context.dataBaseName = "world";
    context.editorType = "sql";
    context.command = "UPDATE city SET N=(SELECT Name FROM country WHERE ID=30) WHERE ID=10";
    context.rangeOffset = 16;
    context.currentChar = "N";
    context.dataSourceName = "MYSQL";
    let parser = new _1.EditorParser();
    let completionRequest = _1.EditorParser.parse(context);
    if (completionRequest == undefined) {
        console.log("补全类型为undefined");
    }
    else {
        console.log(completionRequest);
    }
}
function deleteTest() {
    console.log("当前insertTest：");
    let context = new _1.EditorContext();
    context.cpId = 1;
    context.dataBaseName = "world";
    context.editorType = "sql";
    context.command = "DELETE FROM c";
    context.rangeOffset = 12;
    context.currentChar = "c";
    context.dataSourceName = "MYSQL";
    let parser = new _1.EditorParser();
    let completionRequest = _1.EditorParser.parse(context);
    if (completionRequest == undefined) {
        console.log("补全类型为undefined");
    }
    else {
        console.log(completionRequest);
    }
}
selectTest1();
selectTest2();
// insertTest();
// updateTest();
// deleteTest();
