You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adonis v5 is amazing. I'm building an office project and I'm stuck managing the spatial column on MySQL
I created a spatial column on the migration file by running the following code since I couldn't find an inbuilt method on migration documentation that offers spatial column creation this.schema.raw('ALTER TABLE delivery_locations ADD latlng POINT;').
I was wondering if I could use Lucid ORM to insert into latlng column by prepare decorator? Something like this,
@column({
prepare: (latlng: string) => `POINT(${latlng})`,
})
public latlng: string
Package version
5.1.11
Node.js and npm version
Node.js - v14.15.4
Npm - 6.14.10
Or did I miss anything on documentation? A better way to do it?
The text was updated successfully, but these errors were encountered:
Can you check with knex ( outside AdonisJS ), if it allows insert values to be a raw query? If yes, then I can take out some time in next couple of days to add support for it.
Adonis v5 is amazing. I'm building an office project and I'm stuck managing the spatial column on MySQL
I created a spatial column on the migration file by running the following code since I couldn't find an inbuilt method on migration documentation that offers spatial column creation
this.schema.raw('ALTER TABLE delivery_locations ADD latlng POINT;')
.I was wondering if I could use Lucid ORM to insert into latlng column by prepare decorator? Something like this,
Package version
5.1.11
Node.js and npm version
Node.js - v14.15.4
Npm - 6.14.10
Or did I miss anything on documentation? A better way to do it?
The text was updated successfully, but these errors were encountered: