export-table-pulgin-csharp 1.1.110 → 1.1.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/Json2LiteDB.exe +0 -0
- package/bin/Json2LiteDB.pdb +0 -0
- package/dist/ExportLiteDBCSPlugin.js +2 -2
- package/dist/ExportLiteDBUnityCSJsonPlugin.d.ts.map +1 -1
- package/dist/ExportLiteDBUnityCSJsonPlugin.js +10 -0
- package/package.json +1 -1
- package/src/ExportLiteDBCSPlugin.ts +2 -2
- package/src/ExportLiteDBUnityCSJsonPlugin.ts +9 -0
package/bin/Json2LiteDB.exe
CHANGED
|
Binary file
|
package/bin/Json2LiteDB.pdb
CHANGED
|
Binary file
|
|
@@ -109,7 +109,7 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
|
|
|
109
109
|
if (f.isUnique) {
|
|
110
110
|
let memberName = (0, CSParseTool_1.convMemberName)(f.name);
|
|
111
111
|
let paraName = (0, CSParseTool_1.convVarName)(memberName);
|
|
112
|
-
let tempDictByMemberName = `
|
|
112
|
+
let tempDictByMemberName = `TempDictBy${memberName}`;
|
|
113
113
|
let memberType = (0, CSParseTool_1.getFieldType)(f);
|
|
114
114
|
return `
|
|
115
115
|
protected static Dictionary<${memberType}, ${RowClass}> ${tempDictByMemberName};
|
|
@@ -134,7 +134,7 @@ ${(0, export_table_lib_1.foreach)(fields, f => {
|
|
|
134
134
|
else if (f.type == "number" || f.type == "float" || f.type == "int" || f.type == "long" || f.type == "string") {
|
|
135
135
|
let memberName = (0, CSParseTool_1.convMemberName)(f.name);
|
|
136
136
|
let paraName = (0, CSParseTool_1.convVarName)(memberName);
|
|
137
|
-
let tempRecordsDictByMemberName = `
|
|
137
|
+
let tempRecordsDictByMemberName = `TempRecordsDictBy${memberName}`;
|
|
138
138
|
let memberType = (0, CSParseTool_1.getFieldType)(f);
|
|
139
139
|
return `
|
|
140
140
|
protected static Dictionary<${memberType}, ${RowClass}[]> ${tempRecordsDictByMemberName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExportLiteDBUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportLiteDBUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAqC,MAAM,kBAAkB,CAAA;AAWxJ,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAuFnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAsDzE;AAED,qBAAa,uBAAwB,SAAQ,UAAU;IACtD,IAAI,SAAgB;IACpB,IAAI,EAAE,MAAM,EAAE,CAAkB;IAEhC,WAAW,CAAC,KAAK,EAAE,iBAAiB;
|
|
1
|
+
{"version":3,"file":"ExportLiteDBUnityCSJsonPlugin.d.ts","sourceRoot":"","sources":["../src/ExportLiteDBUnityCSJsonPlugin.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,iBAAiB,EAA+B,UAAU,EAAE,iBAAiB,EAAqC,MAAM,kBAAkB,CAAA;AAWxJ,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAuFnE;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,iBAAiB,GAAG,MAAM,GAAG,IAAI,CAsDzE;AAED,qBAAa,uBAAwB,SAAQ,UAAU;IACtD,IAAI,SAAgB;IACpB,IAAI,EAAE,MAAM,EAAE,CAAkB;IAEhC,WAAW,CAAC,KAAK,EAAE,iBAAiB;IAmEpC,WAAW,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;CAmC3C"}
|
|
@@ -210,6 +210,16 @@ class ExportLiteDBUJsonPlugin extends export_table_lib_1.PluginBase {
|
|
|
210
210
|
console.log("execute-cmdline: " + cmdline);
|
|
211
211
|
var output = cp.spawnSync(binPath, [savePath2, dbPath]);
|
|
212
212
|
console.log(output.output.toString());
|
|
213
|
+
console.log(`delete file: ${savePath2}`);
|
|
214
|
+
try {
|
|
215
|
+
if (fs.existsSync(savePath2)) {
|
|
216
|
+
fs.removeSync(savePath2);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
catch (ex) {
|
|
220
|
+
console.error(`error: cannot delete file ${savePath2}`);
|
|
221
|
+
console.error(ex);
|
|
222
|
+
}
|
|
213
223
|
}
|
|
214
224
|
else {
|
|
215
225
|
console.log(`no litedbpath given, skip conv database`);
|
package/package.json
CHANGED
|
@@ -108,7 +108,7 @@ ${foreach(fields, f => {
|
|
|
108
108
|
if (f.isUnique) {
|
|
109
109
|
let memberName = convMemberName(f.name);
|
|
110
110
|
let paraName = convVarName(memberName);
|
|
111
|
-
let tempDictByMemberName = `
|
|
111
|
+
let tempDictByMemberName = `TempDictBy${memberName}`;
|
|
112
112
|
let memberType = getFieldType(f);
|
|
113
113
|
return `
|
|
114
114
|
protected static Dictionary<${memberType}, ${RowClass}> ${tempDictByMemberName};
|
|
@@ -132,7 +132,7 @@ ${foreach(fields, f => {
|
|
|
132
132
|
} else if (f.type == "number" || f.type == "float" || f.type == "int" || f.type == "long" || f.type == "string") {
|
|
133
133
|
let memberName = convMemberName(f.name);
|
|
134
134
|
let paraName = convVarName(memberName);
|
|
135
|
-
let tempRecordsDictByMemberName = `
|
|
135
|
+
let tempRecordsDictByMemberName = `TempRecordsDictBy${memberName}`;
|
|
136
136
|
let memberType = getFieldType(f);
|
|
137
137
|
return `
|
|
138
138
|
protected static Dictionary<${memberType}, ${RowClass}[]> ${tempRecordsDictByMemberName};
|
|
@@ -208,6 +208,15 @@ export class ExportLiteDBUJsonPlugin extends PluginBase {
|
|
|
208
208
|
console.log("execute-cmdline: " + cmdline)
|
|
209
209
|
var output = cp.spawnSync(binPath, [savePath2, dbPath])
|
|
210
210
|
console.log(output.output.toString())
|
|
211
|
+
console.log(`delete file: ${savePath2}`)
|
|
212
|
+
try {
|
|
213
|
+
if (fs.existsSync(savePath2)) {
|
|
214
|
+
fs.removeSync(savePath2);
|
|
215
|
+
}
|
|
216
|
+
} catch (ex) {
|
|
217
|
+
console.error(`error: cannot delete file ${savePath2}`);
|
|
218
|
+
console.error(ex);
|
|
219
|
+
}
|
|
211
220
|
} else {
|
|
212
221
|
console.log(`no litedbpath given, skip conv database`)
|
|
213
222
|
}
|