PrismaP
Prisma2y ago
1 reply
Nik

Convert Raw Query back to prisma type

Is there any utility function to convert the result of a raw query back to prisma types?

{
    _id: { '$oid': '6587f42a8aad36c44d06e712' },
    type: 'Feature',
    county: { '$oid': '6587f3b38aad36c44d02686a' },
    properties: {
      id: '12103003',
      unit: '',
      number: '3238',
      street: 'WOEDEE DR',
      city: 'UNASSIGNED',
      district: '',
      region: '',
      postcode: '',
      hash: '81c9b3d207ae1932'
    },
    geometry: { type: 'Point', coordinates: [Array] },
    created_at: { $date: '2023-03-23T06:00:46.804Z'  },
    updated_at: { $date: '2023-03-23T06:00:46.804Z'  },
  }
Was this page helpful?