feat: collections can use custom database operations (#7675)
## Description
Adds option to override default database operations for a collection
```ts
import { CollectionConfig } from 'payload/types';
export const Collection: CollectionConfig = {
slug: 'example-collection',
// Database operations for this collection
db: {
create: () => {},
deleteMany: () => {},
deleteOne: () => {},
find: () => {},
findOne: () => {},
updateOne: () => {}
},
fields: [
{
name: 'someField',
type: 'text',
},
],
}
```
Co-authored-by: Dan Ribbens <dan.ribbens@gmail.com>