com.backnd.database 0.0.1
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/Attributes/ColumnAttribute.cs +46 -0
- package/Attributes/ColumnAttribute.cs.meta +11 -0
- package/Attributes/PrimaryKeyAttribute.cs +12 -0
- package/Attributes/PrimaryKeyAttribute.cs.meta +11 -0
- package/Attributes/TableAttribute.cs +44 -0
- package/Attributes/TableAttribute.cs.meta +11 -0
- package/Attributes.meta +8 -0
- package/BACKND.Database.asmdef +14 -0
- package/BACKND.Database.asmdef.meta +7 -0
- package/BaseModel.cs +22 -0
- package/BaseModel.cs.meta +11 -0
- package/Client.cs +490 -0
- package/Client.cs.meta +11 -0
- package/Editor/BACKND.Database.Editor.asmdef +18 -0
- package/Editor/BACKND.Database.Editor.asmdef.meta +7 -0
- package/Editor/PackageAssetInstaller.cs +251 -0
- package/Editor/PackageAssetInstaller.cs.meta +11 -0
- package/Editor.meta +8 -0
- package/Exceptions/DatabaseException.cs +34 -0
- package/Exceptions/DatabaseException.cs.meta +11 -0
- package/Exceptions.meta +8 -0
- package/Internal/ExpressionAnalyzer.cs +433 -0
- package/Internal/ExpressionAnalyzer.cs.meta +11 -0
- package/Internal/QueryTypes.cs +61 -0
- package/Internal/QueryTypes.cs.meta +11 -0
- package/Internal/SqlBuilder.cs +375 -0
- package/Internal/SqlBuilder.cs.meta +11 -0
- package/Internal/ValueFormatter.cs +103 -0
- package/Internal/ValueFormatter.cs.meta +11 -0
- package/Internal.meta +8 -0
- package/Network/DatabaseExecutor.cs +171 -0
- package/Network/DatabaseExecutor.cs.meta +11 -0
- package/Network/DatabaseRequest.cs +16 -0
- package/Network/DatabaseRequest.cs.meta +11 -0
- package/Network/DatabaseResponse.cs +81 -0
- package/Network/DatabaseResponse.cs.meta +11 -0
- package/Network.meta +8 -0
- package/QueryBuilder.cs +1001 -0
- package/QueryBuilder.cs.meta +11 -0
- package/README.md +24 -0
- package/TheBackend~/Plugins/Android/Backend.aar +0 -0
- package/TheBackend~/Plugins/Backend.dll +0 -0
- package/TheBackend~/Plugins/Editor/TheBackendMultiSettingEditor.dll +0 -0
- package/TheBackend~/Plugins/Editor/TheBackendSettingEditor.dll +0 -0
- package/TheBackend~/Plugins/LitJSON.dll +0 -0
- package/TheBackend~/Plugins/Settings/TheBackendHashKeySettings.dll +0 -0
- package/TheBackend~/Plugins/Settings/TheBackendMultiSettings.dll +0 -0
- package/TheBackend~/Plugins/Settings/TheBackendSettings.dll +0 -0
- package/Tools/BTask.cs +905 -0
- package/Tools/BTask.cs.meta +11 -0
- package/Tools/DatabaseLoop.cs +110 -0
- package/Tools/DatabaseLoop.cs.meta +11 -0
- package/Tools/JsonHelper.cs +82 -0
- package/Tools/JsonHelper.cs.meta +11 -0
- package/Tools.meta +8 -0
- package/TransactionBuilder.cs +154 -0
- package/TransactionBuilder.cs.meta +11 -0
- package/TransactionQueryBuilder.cs +205 -0
- package/TransactionQueryBuilder.cs.meta +11 -0
- package/TransactionResult.cs +33 -0
- package/TransactionResult.cs.meta +11 -0
- package/package.json +20 -0
- package/package.json.meta +7 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
using System.Collections.Generic;
|
|
2
|
+
|
|
3
|
+
namespace BACKND.Database.Network
|
|
4
|
+
{
|
|
5
|
+
public class DatabaseRequest
|
|
6
|
+
{
|
|
7
|
+
public string Query { get; set; }
|
|
8
|
+
public Dictionary<string, object> Parameters { get; set; }
|
|
9
|
+
|
|
10
|
+
public DatabaseRequest()
|
|
11
|
+
{
|
|
12
|
+
Query = string.Empty;
|
|
13
|
+
Parameters = new Dictionary<string, object>();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
using System.Collections.Generic;
|
|
2
|
+
|
|
3
|
+
using Newtonsoft.Json;
|
|
4
|
+
|
|
5
|
+
namespace BACKND.Database.Network
|
|
6
|
+
{
|
|
7
|
+
public class Response
|
|
8
|
+
{
|
|
9
|
+
[JsonProperty("success")]
|
|
10
|
+
public bool Success { get; set; }
|
|
11
|
+
|
|
12
|
+
[JsonProperty("result")]
|
|
13
|
+
public string Result { get; set; }
|
|
14
|
+
|
|
15
|
+
[JsonProperty("error")]
|
|
16
|
+
public string Error { get; set; }
|
|
17
|
+
|
|
18
|
+
[JsonProperty("analysis")]
|
|
19
|
+
public AnalysisResult Analysis { get; set; }
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public class AnalysisResult
|
|
23
|
+
{
|
|
24
|
+
[JsonProperty("query")]
|
|
25
|
+
public string Query { get; set; }
|
|
26
|
+
|
|
27
|
+
[JsonProperty("operation")]
|
|
28
|
+
public string Operation { get; set; }
|
|
29
|
+
|
|
30
|
+
[JsonProperty("valid")]
|
|
31
|
+
public bool Valid { get; set; }
|
|
32
|
+
|
|
33
|
+
[JsonProperty("tables")]
|
|
34
|
+
public string[] Tables { get; set; }
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public class QueryResult
|
|
38
|
+
{
|
|
39
|
+
[JsonProperty("operation")]
|
|
40
|
+
public string Operation { get; set; }
|
|
41
|
+
|
|
42
|
+
[JsonProperty("rows_count")]
|
|
43
|
+
public int RowsCount { get; set; }
|
|
44
|
+
|
|
45
|
+
[JsonProperty("columns")]
|
|
46
|
+
public List<string> Columns { get; set; }
|
|
47
|
+
|
|
48
|
+
[JsonProperty("data")]
|
|
49
|
+
public List<Dictionary<string, object>> Data { get; set; }
|
|
50
|
+
|
|
51
|
+
[JsonProperty("message")]
|
|
52
|
+
public string Message { get; set; }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
public class InsertResult
|
|
56
|
+
{
|
|
57
|
+
[JsonProperty("affected_rows")]
|
|
58
|
+
public int AffectedRows { get; set; }
|
|
59
|
+
|
|
60
|
+
[JsonProperty("last_insert_id")]
|
|
61
|
+
public object LastInsertId { get; set; }
|
|
62
|
+
|
|
63
|
+
[JsonProperty("operation")]
|
|
64
|
+
public string Operation { get; set; }
|
|
65
|
+
|
|
66
|
+
[JsonProperty("message")]
|
|
67
|
+
public string Message { get; set; }
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
public class MutationResult
|
|
71
|
+
{
|
|
72
|
+
[JsonProperty("affected_rows")]
|
|
73
|
+
public int AffectedRows { get; set; }
|
|
74
|
+
|
|
75
|
+
[JsonProperty("operation")]
|
|
76
|
+
public string Operation { get; set; }
|
|
77
|
+
|
|
78
|
+
[JsonProperty("message")]
|
|
79
|
+
public string Message { get; set; }
|
|
80
|
+
}
|
|
81
|
+
}
|