Skip to content

Conversation

@spy16
Copy link

@spy16 spy16 commented Aug 22, 2017

As per https://docs.mongodb.com/manual/reference/connection-string/ doc, database name can be specified in the connection string itself. Using mgo, it can be easily verified if database name is specified
or not. I believe this was the whole and the only point of having dbSpecified optional argument in NewAdapter function. Using the above specification and mgo.ParseURL() function i have removed this while pertaining the behavior.

@coveralls
Copy link

Coverage Status

Coverage increased (+1.2%) to 73.889% when pulling 77c11b5 on shivylp:master into 50636fc on casbin:master.

@hsluoyz hsluoyz merged commit 654a9aa into casbin:master Aug 22, 2017
@hsluoyz
Copy link
Member

hsluoyz commented Aug 22, 2017

Thanks. I also once tried to find a way to determine dbname existence without parsing the string manually but failed. This solution clearly looks better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants