Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- uses: actions/checkout@master
- uses: denolib/setup-deno@master
with:
deno-version: 1.0.0
deno-version: 1.0.2
- name: Run tests
run: |
cp ./ormconfig.gh-actions.json ./ormconfig.json
Expand Down
2 changes: 1 addition & 1 deletion dem.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
"protocol": "https",
"path": "deno.land/std",
"version": "v0.51.0",
"version": "0.53.0",
"files": [
"/async/deferred.ts",
"/fmt/colors.ts",
Expand Down
3 changes: 2 additions & 1 deletion test/deps/sinon.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sinon from 'https://cdn.pika.dev/sinon@^8.1.1';
import sinon from "https://dev.jspm.io/sinon@8.1.1";
//import sinon from 'https://cdn.pika.dev/sinon@^8.1.1';

export default sinon;
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export class Post {
key!: number;

@OneToOne(type => PostDetails, details => details.post, {
cascade!: ["insert"]
cascade: ["insert"]
})
@JoinColumn()
details!: PostDetails;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class PostDetails {
keyword!: string;

@OneToOne(type => Post, post => post.details, {
cascade!: ["insert"]
cascade: ["insert"]
})
post!: Post;

Expand Down
2 changes: 1 addition & 1 deletion test/functional/columns/getters-setters/entity/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class Post {
}
}

@Column({ type!: String })
@Column({ type: String })
get title(): string {
return this._title;
}
Expand Down
2 changes: 1 addition & 1 deletion test/functional/connection/entity/View.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {Entity} from "../../../../src/decorator/entity/Entity.ts";
import {PrimaryColumn} from "../../../../src/decorator/columns/PrimaryColumn.ts";
import {Column} from "../../../../src/decorator/columns/Column.ts";

@Entity("view", { synchronize!: false })
@Entity("view", { synchronize: false })
export class View {

@PrimaryColumn({ type: Number })
Expand Down
6 changes: 3 additions & 3 deletions test/functional/cube/postgres/entity/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ export class Post {
id!: number;

@Column("cube", {
nullable!: true
nullable: true
})
mainColor!: number[];

@Column("cube", {
nullable!: true,
array!: true
nullable: true,
array: true
})
colors!: number[][];
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ export class Post {
id!: number;

@Column("char", {
length!: 50
length: 50
})
char!: string;

@Column("varchar", {
length!: 50
length: 50
})
varchar!: string;

@Column("nchar", {
length!: 50
length: 50
})
nchar!: string;

@Column("nvarchar", {
length!: 50
length: 50
})
nvarchar!: string;

@Column("binary", {
length!: 50
length: 50
})
binary!: Uint8Array;/* Buffer; */

@Column("varbinary", {
length!: 50
length: 50
})
varbinary!: Uint8Array;/* Buffer; */

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ export class Post {
id!: number;

@Column("char", {
length!: 50
length: 50
})
char!: string;

@Column("varchar", {
length!: 50
length: 50
})
varchar!: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ export class Post {
id!: number;

@Column("character varying", {
length!: 50
length: 50
})
characterVarying!: string;

@Column("varchar", {
length!: 50
length: 50
})
varchar!: string;

@Column("character", {
length!: 50
length: 50
})
character!: string;

@Column("char", {
length!: 50
length: 50
})
char!: string;

Expand Down
10 changes: 5 additions & 5 deletions test/functional/database-schema/column-length/sap/entity/Post.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ export class Post {
id!: number;

@Column("varchar", {
length!: 50
length: 50
})
varchar!: string;

@Column("nvarchar", {
length!: 50
length: 50
})
nvarchar!: string;

@Column("alphanum", {
length!: 50
length: 50
})
alphanum!: string;

@Column("shorttext", {
length!: 50
length: 50
})
shorttext!: string;

@Column("varbinary", {
length!: 50
length: 50
})
varbinary!: Uint8Array;/*Buffer;*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@ export class Post {
id!: number;

@Column("character", {
length!: 50
length: 50
})
character!: string;

@Column("varchar", {
length!: 50
length: 50
})
varchar!: string;

@Column("varying character", {
length!: 50
length: 50
})
varying_character!: string;

@Column("nchar", {
length!: 50
length: 50
})
nchar!: string;

@Column("native character", {
length!: 50
length: 50
})
native_character!: string;

@Column("nvarchar", {
length!: 50
length: 50
})
nvarchar!: string;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,67 +39,67 @@ export class EnumArrayEntity {
id!: number;

@Column({
type!: "enum",
type: "enum",
enum: NumericEnum,
array!: true,
default!: [NumericEnum.GHOST, NumericEnum.ADMIN]
array: true,
default: [NumericEnum.GHOST, NumericEnum.ADMIN]
})
numericEnums!: NumericEnum[];

@Column({
type!: "enum",
type: "enum",
enum: StringEnum,
array!: true,
default!: []
array: true,
default: []
})
stringEnums!: StringEnum[];

@Column({
type!: "enum",
type: "enum",
enum: StringNumericEnum,
array!: true,
default!: [StringNumericEnum.THREE, StringNumericEnum.ONE]
array: true,
default: [StringNumericEnum.THREE, StringNumericEnum.ONE]
})
stringNumericEnums!: StringNumericEnum[];

@Column({
type!: "enum",
type: "enum",
enum: HeterogeneousEnum,
array!: true,
default!: [HeterogeneousEnum.YES]
array: true,
default: [HeterogeneousEnum.YES]
})
heterogeneousEnums!: HeterogeneousEnum[];

@Column({
type!: "enum",
type: "enum",
enum: ["admin", "editor", "ghost"],
array!: true,
default!: ["admin"]
array: true,
default: ["admin"]
})
arrayDefinedStringEnums!: ArrayDefinedStringEnumType[];

@Column({
type!: "enum",
type: "enum",
enum: [11, 12, 13],
array!: true,
default!: [11, 13]
array: true,
default: [11, 13]
})
arrayDefinedNumericEnums!: ArrayDefinedNumericEnumType[];

@Column({
type!: "enum",
type: "enum",
enum: StringEnum,
array!: true,
nullable!: true
array: true,
nullable: true
})
enumWithoutDefault!: StringEnum[];


@Column({
type!: "enum",
type: "enum",
enum: StringEnum,
array!: true,
default!: "{}"
array: true,
default: "{}"
})
legacyDefaultAsString!: StringEnum[];
}
28 changes: 14 additions & 14 deletions test/functional/database-schema/enums/entity/EnumEntity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,50 +39,50 @@ export class EnumEntity {
id!: number;

@Column({
type!: "enum",
type: "enum",
enum: NumericEnum,
default!: NumericEnum.MODERATOR
default: NumericEnum.MODERATOR
})
numericEnum!: NumericEnum;

@Column({
type!: "enum",
type: "enum",
enum: StringEnum,
default!: StringEnum.GHOST
default: StringEnum.GHOST
})
stringEnum!: StringEnum;

@Column({
type!: "enum",
type: "enum",
enum: StringNumericEnum,
default!: StringNumericEnum.FOUR
default: StringNumericEnum.FOUR
})
stringNumericEnum!: StringNumericEnum;

@Column({
type!: "enum",
type: "enum",
enum: HeterogeneousEnum,
default!: HeterogeneousEnum.NO
default: HeterogeneousEnum.NO
})
heterogeneousEnum!: HeterogeneousEnum;

@Column({
type!: "enum",
type: "enum",
enum: ["admin", "editor", "ghost"],
default!: "ghost"
default: "ghost"
})
arrayDefinedStringEnum!: ArrayDefinedStringEnumType;

@Column({
type!: "enum",
type: "enum",
enum: [11, 12, 13],
default!: 12
default: 12
})
arrayDefinedNumericEnum!: ArrayDefinedNumericEnumType;

@Column({
type!: "enum",
enum!: StringEnum,
type: "enum",
enum: StringEnum,
})
enumWithoutdefault!: StringEnum;

Expand Down
4 changes: 2 additions & 2 deletions test/functional/database-schema/sequences/entity/Person.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export class Person {
Id!: number;

@Column({
type!: String,
unique!: true
type: String,
unique: true
})
Name!: string;

Expand Down
Loading