Is it possible for a go module to do sql queries on another database at another domain other than were nakama is being hosted? Any sandbox or security hurdles as far as nakama is concerned? Is this possible if it’s another database but on the same domain? I’m trying to open up another sql connection within our go module but getting a runtime error from nakama:invalid memory address or nil pointer.
Thanks
Additional information: I was not using the db argument passed into the rpc definition as per nakama requirements, but using a new variable to hold the sql.Open results. I assume the db argument is a reference to the global nakama database connection.
ahh I was setting connection properties like maxOpenConns and MaxIdleCons which maybe don’t exist for postgres - once I removed those, the connection is working.
@oscargoldman It would be helpful to share the code you created that works for others in the community to take advantage of if they need it. You can absolutely open SQL connections to another database in your Go code you must initialize that database connection pool like any other Go code. There’s no utility code in Nakama to manage databases that it doesn’t depend on.