Created a base class to place and fetch data from OCI. Any class that corresponds to an entry into the database should follow the following composition.
export interface IUser extends IDbItem {
...
}
export class User extends DbItem {
constructor(id: string, props: UserProps) {
// the class itself should assign which collection an item lives in!
super(id, 'users');
...
}
}
helper function to get documents from the DbClient
Testing
Figured out how to mock oracledb through jest
Put environment variables for testing
Some prelim tests for DbClient
BREAKING CHANGES
When running client.openCollection(name), if the NODE_ENV is not PROD, we will now target the collection with name test_${name}.
We should probably write a script to delete the contents of this table periodically too.. as well as create a backup for our current tables...
Thanks for contributing! Your pull request will be updated from master and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).
Features
Created a base class to place and fetch data from OCI. Any class that corresponds to an entry into the database should follow the following composition.
DbClient
Testing
DbClient
BREAKING CHANGES When running
client.openCollection(name)
, if theNODE_ENV
is notPROD
, we will now target the collection with nametest_${name}
.We should probably write a script to delete the contents of this table periodically too.. as well as create a backup for our current tables...