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.
Files changed (63) hide show
  1. package/Attributes/ColumnAttribute.cs +46 -0
  2. package/Attributes/ColumnAttribute.cs.meta +11 -0
  3. package/Attributes/PrimaryKeyAttribute.cs +12 -0
  4. package/Attributes/PrimaryKeyAttribute.cs.meta +11 -0
  5. package/Attributes/TableAttribute.cs +44 -0
  6. package/Attributes/TableAttribute.cs.meta +11 -0
  7. package/Attributes.meta +8 -0
  8. package/BACKND.Database.asmdef +14 -0
  9. package/BACKND.Database.asmdef.meta +7 -0
  10. package/BaseModel.cs +22 -0
  11. package/BaseModel.cs.meta +11 -0
  12. package/Client.cs +490 -0
  13. package/Client.cs.meta +11 -0
  14. package/Editor/BACKND.Database.Editor.asmdef +18 -0
  15. package/Editor/BACKND.Database.Editor.asmdef.meta +7 -0
  16. package/Editor/PackageAssetInstaller.cs +251 -0
  17. package/Editor/PackageAssetInstaller.cs.meta +11 -0
  18. package/Editor.meta +8 -0
  19. package/Exceptions/DatabaseException.cs +34 -0
  20. package/Exceptions/DatabaseException.cs.meta +11 -0
  21. package/Exceptions.meta +8 -0
  22. package/Internal/ExpressionAnalyzer.cs +433 -0
  23. package/Internal/ExpressionAnalyzer.cs.meta +11 -0
  24. package/Internal/QueryTypes.cs +61 -0
  25. package/Internal/QueryTypes.cs.meta +11 -0
  26. package/Internal/SqlBuilder.cs +375 -0
  27. package/Internal/SqlBuilder.cs.meta +11 -0
  28. package/Internal/ValueFormatter.cs +103 -0
  29. package/Internal/ValueFormatter.cs.meta +11 -0
  30. package/Internal.meta +8 -0
  31. package/Network/DatabaseExecutor.cs +171 -0
  32. package/Network/DatabaseExecutor.cs.meta +11 -0
  33. package/Network/DatabaseRequest.cs +16 -0
  34. package/Network/DatabaseRequest.cs.meta +11 -0
  35. package/Network/DatabaseResponse.cs +81 -0
  36. package/Network/DatabaseResponse.cs.meta +11 -0
  37. package/Network.meta +8 -0
  38. package/QueryBuilder.cs +1001 -0
  39. package/QueryBuilder.cs.meta +11 -0
  40. package/README.md +24 -0
  41. package/TheBackend~/Plugins/Android/Backend.aar +0 -0
  42. package/TheBackend~/Plugins/Backend.dll +0 -0
  43. package/TheBackend~/Plugins/Editor/TheBackendMultiSettingEditor.dll +0 -0
  44. package/TheBackend~/Plugins/Editor/TheBackendSettingEditor.dll +0 -0
  45. package/TheBackend~/Plugins/LitJSON.dll +0 -0
  46. package/TheBackend~/Plugins/Settings/TheBackendHashKeySettings.dll +0 -0
  47. package/TheBackend~/Plugins/Settings/TheBackendMultiSettings.dll +0 -0
  48. package/TheBackend~/Plugins/Settings/TheBackendSettings.dll +0 -0
  49. package/Tools/BTask.cs +905 -0
  50. package/Tools/BTask.cs.meta +11 -0
  51. package/Tools/DatabaseLoop.cs +110 -0
  52. package/Tools/DatabaseLoop.cs.meta +11 -0
  53. package/Tools/JsonHelper.cs +82 -0
  54. package/Tools/JsonHelper.cs.meta +11 -0
  55. package/Tools.meta +8 -0
  56. package/TransactionBuilder.cs +154 -0
  57. package/TransactionBuilder.cs.meta +11 -0
  58. package/TransactionQueryBuilder.cs +205 -0
  59. package/TransactionQueryBuilder.cs.meta +11 -0
  60. package/TransactionResult.cs +33 -0
  61. package/TransactionResult.cs.meta +11 -0
  62. package/package.json +20 -0
  63. 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,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 2f892e997818446ad9e050d3058daf2b
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
@@ -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
+ }
@@ -0,0 +1,11 @@
1
+ fileFormatVersion: 2
2
+ guid: 5a5572084db4e423fa40a90fc4a11cbf
3
+ MonoImporter:
4
+ externalObjects: {}
5
+ serializedVersion: 2
6
+ defaultReferences: []
7
+ executionOrder: 0
8
+ icon: {instanceID: 0}
9
+ userData:
10
+ assetBundleName:
11
+ assetBundleVariant:
package/Network.meta ADDED
@@ -0,0 +1,8 @@
1
+ fileFormatVersion: 2
2
+ guid: dbd1815615bc74f51b488bd54edd46c8
3
+ folderAsset: yes
4
+ DefaultImporter:
5
+ externalObjects: {}
6
+ userData:
7
+ assetBundleName:
8
+ assetBundleVariant: