Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 589cb7d579 | |||
| 3680ad1914 | |||
| 96e13d85fc | |||
| 5a9283ad85 |
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@extollo/lib",
|
"name": "@extollo/lib",
|
||||||
"version": "0.5.6",
|
"version": "0.5.8",
|
||||||
"description": "The framework library that lifts up your code.",
|
"description": "The framework library that lifts up your code.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ export class PostgreSQLDialect extends SQLDialect {
|
|||||||
const table: string = tableString.split('.').map(x => `"${x}"`)
|
const table: string = tableString.split('.').map(x => `"${x}"`)
|
||||||
.join('.')
|
.join('.')
|
||||||
queryLines.push('INSERT INTO ' + (typeof source === 'string' ? table : `${table} AS "${source.alias}"`)
|
queryLines.push('INSERT INTO ' + (typeof source === 'string' ? table : `${table} AS "${source.alias}"`)
|
||||||
+ (columns.length ? ` (${columns.join(', ')})` : ''))
|
+ (columns.length ? ` (${columns.map(x => `"${x}"`).join(', ')})` : ''))
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( Array.isArray(data) && !data.length ) {
|
if ( Array.isArray(data) && !data.length ) {
|
||||||
|
|||||||
@@ -627,7 +627,7 @@ export abstract class Model<T extends Model<T>> extends AppClass implements Bus
|
|||||||
|
|
||||||
const data = result.rows.first()
|
const data = result.rows.first()
|
||||||
if ( data ) {
|
if ( data ) {
|
||||||
await this.assumeFromSource(result)
|
await this.assumeFromSource(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.dispatch(new ModelCreatedEvent<T>(this as any))
|
await this.dispatch(new ModelCreatedEvent<T>(this as any))
|
||||||
|
|||||||
Reference in New Issue
Block a user