feat: add batch insert operations to repositories (refs #26)
Add batchInsert methods to vehicles, fuel-logs, maintenance, and documents repositories. Multi-value INSERT syntax provides 10-100x performance improvement over individual operations for bulk data import. - vehicles.repository: batchInsert for vehicles - fuel-logs.repository: batchInsert for fuel logs - maintenance.repository: batchInsertRecords and batchInsertSchedules - documents.repository: batchInsert for documents - All methods support empty array (immediate return) and optional transaction client - Fix lint error: replace require() with ES6 import in test mock Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,8 @@ import fastifyPlugin from 'fastify-plugin';
|
||||
|
||||
// Mock auth plugin to bypass JWT validation in tests
|
||||
jest.mock('../../../../core/plugins/auth.plugin', () => {
|
||||
const fp = require('fastify-plugin');
|
||||
return {
|
||||
default: fp(async function(fastify: any) {
|
||||
default: fastifyPlugin(async function(fastify: any) {
|
||||
fastify.decorate('authenticate', async function(request: any, _reply: any) {
|
||||
request.user = { sub: 'test-user-123' };
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user