|
And providers, it can only connect to these databases through direct connections or through connection pooling, for example. Both problems are now solved with the introduction of driver adapters that enable the use of existing database drivers when connecting to supported databases. Today we are releasing two driver adapters and. between clients and serverless database drivers. If you use a database driver and driver adapter your application no longer requires a direct connection to the database to run but instead communicates with the database through an or connection. Use an engine to translate client queries and then run those queries through these drivers. With this setup we are able to provide the best of both worlds: a proven query engine and the ability to use a growing number of providers within the supported code base.
The diagram shows the client using a qu photo editing servies ery engine to translate the query but using a separate database driver for communication. Clients use driver adapters and serverless database drivers to communicate with the database. The only requirement now is to be able to issue or request which greatly simplifies Function-as-a-Service deployment. How to use it with serverless database driver Setting up to use or serverless database driver is very simple. Set up the database driver as usual. Pass it to the appropriate driver adapter. Create a client using that driver adapter. First install and at least version 2. To install so that any environment variables defined in the file can be copied over Now you can set up the client as follows. After creating the database using Neon Sign on Neon Technologies you will need to install the driver adapter for the serverless .

Database driver and set up the connection for use. Copy then make sure your database connection string is copied into your file. The connection string will start with . You can now reference this environment variable in your data source. Make sure you include a preview feature as well. Copy now runs to regenerate the client and make the preview functionality available in your application. After completing the above setup you can continue writing scripts Import the package Set up the serverless database driver Use the serverless database driver Instantiate the adapter Pass the driver adapter to the client instance Copy Now your code has the built-in benefits of the serverless driver .
|
|