Commit Graph

407 Commits

Author SHA1 Message Date
ionutboangiu
b5dbb31163 Clean up and refactor after mongo update
- Converting directly from a D to an M is deprecated. We are now decoding
  directly in a M.
- Used errors.As and errors.Is for proper error comparison and assertion
- Streamlined function parameters and removed redundancies
- Revised sloppy reassignments and added missing error checks
- Shortened and reorganized function structure for improved readability
2023-07-04 13:19:31 +02:00
ionutboangiu
076bb172f1 Remove custom time decoder for MongoDB
Remove the custom time decoder used for mongo BSON
datetime values. The custom decoder was only converting these values
into UTC and was not any different from the default time.Time
decoder in the MongoDB driver, which also handles BSON string, int64,
and document values.
2023-07-04 13:19:31 +02:00
ionutboangiu
a7c785d925 Upgrade MongoDB driver to v1.12
- Set (but comment) serverAPI options (currently distinct api and
create.size BSON field are deprecated + possible others that are untested)
- Rename and refactor 'TimeDecodeValue1' to 'decodeTimeValue', add
nil case handling
- Implement 'buildURL' function to connect to mongo (can also be
used for mysql and postgres)
- Update function names, variable names, and comments for clarity
- Replace 'bsonx.Regex' with the Regex primitive for v1.12 compatibility
- Use simple concatenation instead of Sprintf
- Declare 'timeType' locally, replace global 'tTime'
- Use 'RegisterTypeDecoder' to replace deprecated 'RegisterDecoder'
- Simplify several functions without altering functionality
- Remove redundant 'storageType' field in 'mongoStorage',
use 'isDataDB' instead
2023-07-04 13:19:31 +02:00
ionutboangiu
b7d172f78a Fix misspellings 2023-06-21 11:02:39 +02:00
ionutboangiu
62619ba3a5 Replace interface{} with any 2023-06-05 10:55:32 +02:00
adi
132d206266 Finished updates for mongo driver and tests 2023-01-07 17:49:13 +01:00
adi
5890d11279 Updated mongo driver and it tests 2023-01-07 17:49:13 +01:00
adi
c94ed8d123 Improved soME tests and driver 2022-12-27 18:29:32 +02:00
ionutboangiu
82468c580d Replace deprecated ioutil library, remove redundant statements + small optimizations 2022-12-02 14:24:18 +02:00
adi
b1f6028380 Updated mongo library 2022-11-18 11:47:21 +01:00
ionutboangiu
758a94280a Apply project wide fmt 2022-11-16 10:13:44 +01:00
porosnicuadrian
b715ff4009 Added verifrication for db port 2022-05-28 09:50:51 +02:00
porosnicuadrian
2d36afe34f New constructor for FilterIndexes with old idx to avoid overwrite at ComputeID 2021-09-15 10:06:34 +02:00
porosnicuadrian
30a4b9e2e8 Removed logs 2021-09-13 16:09:59 +02:00
porosnicuadrian
235d3f58ad Started debuging for set indexes in mongo/mysql 2021-09-13 16:09:59 +02:00
Trial97
a2a340f251 Updated ApierV1.SetRatingProfile and ApierV1.RemoveRatingProfile. Fixes #3186 2021-08-19 17:47:23 +02:00
porosnicuadrian
166670b0d7 Updated internal and mongo db code for removing cases 2021-08-18 14:40:06 +02:00
Trial97
a6aa435a8d Updated AcionPlans 2021-06-08 12:05:51 +02:00
Trial97
a1584a8649 Added test for set account with action plan 2021-06-08 12:05:51 +02:00
Trial97
3d10924717 Moved Filter.Compile from driver function to datamanager 2020-07-09 15:49:59 +03:00
TeoV
b3f7769cb7 Add support for Mongo for different Marshaler 2020-03-01 17:28:31 +01:00
adragusin
3a1104ff01 Removed directions from templates 2020-01-21 13:36:07 +02:00
Trial97
9941551826 Updated apier tests 2020-01-15 16:22:47 +02:00
TeoV
b8b65bb0b8 Send StoredStatQueue instead of StatQueue when replicate fixes #1864 2020-01-15 14:20:43 +02:00
TeoV
0d14876431 Add UpdateTime filed at Account structure 2020-01-10 13:47:47 +02:00
Trial97
712a1fd2da Updated services reload 2020-01-06 17:43:54 +02:00
Trial97
23c1e19a58 Updated MongoStorage 2019-12-12 10:30:31 +02:00
Trial97
d1d851009a Updated SetStoredStatQueueDrv and removed unused Marshaler function 2019-12-02 13:15:26 +02:00
TeoV
11fa04f3d0 Implement rest of methods from StorageInterface in DataManager 2019-11-21 12:58:27 +01:00
TeoV
af1cfc64c8 Implement Replication for all Set Methods 2019-11-20 19:48:14 +01:00
TeoV
0f0c05633e Add Destination/ReverseDestination methods in DataManager 2019-11-20 10:54:31 +01:00
TeoV
bc5cf765c3 Update Remote functionality through RPC 2019-11-15 13:36:53 +01:00
TeoV
4000890138 Implement GetAccountActionPlans in DataManager 2019-11-12 11:45:59 +01:00
TeoV
65113f2739 Clean logs and update AccountAction method when remoteDMs are set 2019-11-12 11:45:59 +01:00
TeoV
4edda324e0 Add more tests 2019-11-12 11:45:59 +01:00
TeoV
cc0855ce83 Rename GetAccount with GetAccountDrv and add GetAccount in DataManager 2019-11-07 17:52:59 +01:00
Trial97
61fc8c98a3 Added DataManager as Service 2019-10-28 12:17:15 +01:00
Trial97
8cddeca1a0 Added migrator for *load_ids 2019-10-09 17:27:43 +02:00
TeoV
d930e82886 Add tests for Offline TariffPlans 2019-10-04 20:17:40 +02:00
TeoV
2c8d717007 Finishing implemented datadb methods for InternalDB 2019-10-04 20:17:40 +02:00
TeoV
a27a03b7f6 Implement more methods for InternalDB 2019-10-04 20:17:40 +02:00
Trial97
a08b190a4e Replaced IsSliceMember with SliceHasMember for constant slices 2019-08-08 19:12:47 +02:00
Trial97
e923babcee Updated mongo storage 2019-07-18 02:54:19 -10:00
Trial97
ab77aaebc8 Downgraded mongo library 2019-07-17 04:59:52 -10:00
Trial97
965f645d09 Updated mongo ensureIndexes 2019-07-17 04:59:52 -10:00
Trial97
c1f49a6e73 Updated glide.yaml 2019-07-16 22:42:42 -10:00
Tripon Alexandru-Ionut
a80365313c Added DispatcherHost to Dispatchers migration 2019-05-02 21:27:15 +02:00
Tripon Alexandru-Ionut
a21e82e642 Added EnsureIndexes per migration for mongoDB 2019-05-02 21:27:15 +02:00
Tripon Alexandru-Ionut
618dc9d3cc Updated EnsureIndexesForCol 2019-04-19 18:16:08 +03:00
Tripon Alexandru-Ionut
c9211a928a Updated EnsureIndexes 2019-04-19 17:40:34 +03:00