@dascompany/product 4.0.11 → 4.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/SQL.json
CHANGED
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"select": "SELECT * FROM files.files",
|
|
100
100
|
"selectId": "SELECT id FROM files.files ",
|
|
101
101
|
"selectForConnection": "SELECT id, name, catalog, type, sequence FROM files.files JOIN files.file_connections ON file_id = id",
|
|
102
|
-
"insert": "INSERT INTO files.files( id, name, orginal_name, catalog, size_kb, type, created_at ) VALUES ( $id::BIGINT, $name::TEXT, $orginal_name::TEXT, $catalog::TEXT, $size_kb::BIGINT, $type::TEXT, now() )",
|
|
103
|
-
"update": "UPDATE files.files SET name = $name::TEXT, orginal_name = $orginal_name::TEXT, catalog = $catalog::TEXT, size_kb = $size_kb::BIGINT, type = $type::TEXT WHERE id = $id::BIGINT ",
|
|
102
|
+
"insert": "INSERT INTO files.files( id, name, orginal_name, catalog, size_kb, type, alt, title, created_at ) VALUES ( $id::BIGINT, $name::TEXT, $orginal_name::TEXT, $catalog::TEXT, $size_kb::BIGINT, $type::TEXT, $alt::TEXT, $title::TEXT, now() )",
|
|
103
|
+
"update": "UPDATE files.files SET name = $name::TEXT, orginal_name = $orginal_name::TEXT, catalog = $catalog::TEXT, size_kb = $size_kb::BIGINT, type = $type::TEXT, alt = $alt::TEXT, title = $title::TEXT WHERE id = $id::BIGINT ",
|
|
104
104
|
"count": "SELECT COUNT(*) AS total_rows FROM files.files",
|
|
105
105
|
"delete": "DELETE FROM files.files WHERE id = $id::BIGINT ",
|
|
106
106
|
"selectNextId": "SELECT nextval('files.files_id'::regclass)"
|
|
@@ -5,12 +5,16 @@ export default class File extends StockObject {
|
|
|
5
5
|
private sizeKb;
|
|
6
6
|
private type;
|
|
7
7
|
private orginalName;
|
|
8
|
-
|
|
8
|
+
private alt;
|
|
9
|
+
private title;
|
|
10
|
+
constructor(name: string, catalog: string, sizeKb: number, type: string, orginalName: string, alt?: string, title?: string);
|
|
9
11
|
getName(): string;
|
|
10
12
|
getCatalog(): string;
|
|
11
13
|
getSizeKb(): number;
|
|
12
14
|
getType(): string;
|
|
13
15
|
getOrginalName(): string;
|
|
16
|
+
getAlt(): string;
|
|
17
|
+
getTitle(): string;
|
|
14
18
|
setName(name: string): void;
|
|
15
19
|
setCatalog(catalog: string): void;
|
|
16
20
|
setSizeKb(sizeKb: number): void;
|
|
@@ -6,13 +6,17 @@ export default class File extends StockObject {
|
|
|
6
6
|
sizeKb;
|
|
7
7
|
type;
|
|
8
8
|
orginalName;
|
|
9
|
-
|
|
9
|
+
alt;
|
|
10
|
+
title;
|
|
11
|
+
constructor(name, catalog, sizeKb, type, orginalName, alt = '', title = '') {
|
|
10
12
|
super();
|
|
11
13
|
this.name = name;
|
|
12
14
|
this.catalog = catalog;
|
|
13
15
|
this.sizeKb = sizeKb;
|
|
14
16
|
this.type = type;
|
|
15
17
|
this.orginalName = orginalName;
|
|
18
|
+
this.alt = alt;
|
|
19
|
+
this.title = title;
|
|
16
20
|
}
|
|
17
21
|
getName() {
|
|
18
22
|
return this.name;
|
|
@@ -29,6 +33,12 @@ export default class File extends StockObject {
|
|
|
29
33
|
getOrginalName() {
|
|
30
34
|
return this.orginalName;
|
|
31
35
|
}
|
|
36
|
+
getAlt() {
|
|
37
|
+
return this.alt;
|
|
38
|
+
}
|
|
39
|
+
getTitle() {
|
|
40
|
+
return this.title;
|
|
41
|
+
}
|
|
32
42
|
setName(name) {
|
|
33
43
|
this.name = name;
|
|
34
44
|
}
|
|
@@ -48,6 +48,8 @@ export default class FilesTable extends Table {
|
|
|
48
48
|
query.bindParameter('catalog', file.getCatalog());
|
|
49
49
|
query.bindParameter('size_kb', file.getSizeKb());
|
|
50
50
|
query.bindParameter('type', file.getType());
|
|
51
|
+
query.bindParameter('alt', file.getAlt());
|
|
52
|
+
query.bindParameter('title', file.getTitle());
|
|
51
53
|
}
|
|
52
54
|
async delete(fileId) {
|
|
53
55
|
const query = this.createQuery(SQL.files.delete);
|