Previously for classes that implemented Connection interface, each constructor could have it's own custom arguments needed to fulfill it's classes usage. When you list out the arguments when constructing a new instance of it you would have to know what argument goes in what order, and the arguments differ per Connection class.
This change makes it so each Connection constructor now takes an object that has a type associated to it so you can see what the values required are.
Resolves #10
Tasks
[X] Update the OuterbaseConnection constructor to support a OuterbaseConnectionDetails type in the constructor
[X] Update the CloudflareD1Connection constructor to support a CloudflareD1ConnectionDetails type in the constructor
Verify
You can still instantiate and query a Cloudflare connection
You can still instantiate and query an Outerbase connection
Before
const d1 = new CloudflareD1Connection(
'API_KEY',
'ACCOUNT_ID',
'DATABASE_ID'
)
Purpose
Previously for classes that implemented
Connection
interface, eachconstructor
could have it's own custom arguments needed to fulfill it's classes usage. When you list out the arguments when constructing a new instance of it you would have to know what argument goes in what order, and the arguments differ per Connection class.This change makes it so each Connection constructor now takes an object that has a type associated to it so you can see what the values required are.
Resolves #10
Tasks
OuterbaseConnection
constructor to support aOuterbaseConnectionDetails
type in the constructorCloudflareD1Connection
constructor to support aCloudflareD1ConnectionDetails
type in the constructorVerify
Before
After