jingzhi Posted November 10, 2017 Posted November 10, 2017 Hi everyone, I am working on a general database script and I am wondering if establishing multiple database connections in different resources will affect the performance. If that is true, can database connections be shared in different resources(e.g. by exporting function)? Thanks in advance! Moreover, if I export a function that uses database connection to a different resource, does the function use the dbconnection established in the resource exporting the function, or it must use the connection in the resource I'm calling the function from?
WorthlessCynomys Posted November 10, 2017 Posted November 10, 2017 If you make a connection resource and do: function getConnection() return connection end Then you export this, you can get the connection from every resource, it'll work 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now