- Set (but comment) serverAPI options (currently distinct api and
create.size BSON field are deprecated + possible others that are untested)
- 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.
- 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 (deprecated since 1.12).
- Use simple concatenation instead of Sprintf
- Declare 'decimalType' locally, replace global 'decimalType'
- Simplify several functions without altering functionality
- 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
- Revised sloppy reassignments and added missing error checks
HierarchyPath parser now returns nil when
the path is empty (instead of a string slice with one
EmptyString element).
If isAbsolute is set to true, when calling the AsString
method on a nil HierarchyPath, only the separator will
be returned. Alternatively, if isAbsolute is false, it
will just return . to signal that the path currently
being processed is the one required.This avoids a nil
expr error coming from the xmlquery library.
Use the Query and QueryAll functions from the xmlquery
package to be able to handle the errors ourselves and
avoid panics.
Remove config default value for xmlRootPath. The field
will remain commented in config_defaults for reference.
Add tests for HierarchyPath.AsString function.
Add comments for XmlProvider and xmlRootPath opt.
Update XmlProvider String() func based on the comment
which specifies that it should display the already
parsed values out of cache.
Add StorDB to config and services.
Put back the store_cdrs option under cdrs and update the CDRs
service to depend on StorDB.
Define the StorDB interface and add a constructor for it.
Add a constructor for postgres storage.
Add a config sanity check to validate SSL modes for postgres.
Update cgr-engine to consider StorDB on startup.