@teamkeel/functions-runtime 0.394.0-prerelease → 0.394.0
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/package.json +1 -1
- package/src/ModelAPI.js +0 -4
- package/src/ModelAPI.test.js +8 -0
package/package.json
CHANGED
package/src/ModelAPI.js
CHANGED
|
@@ -233,7 +233,6 @@ class ModelAPI {
|
|
|
233
233
|
|
|
234
234
|
async function create(conn, tableName, tableConfigs, values) {
|
|
235
235
|
try {
|
|
236
|
-
console.log(values);
|
|
237
236
|
let query = conn.insertInto(tableName);
|
|
238
237
|
|
|
239
238
|
const keys = values ? Object.keys(values) : [];
|
|
@@ -250,9 +249,6 @@ async function create(conn, tableName, tableConfigs, values) {
|
|
|
250
249
|
const columnConfig = tableConfig[key];
|
|
251
250
|
|
|
252
251
|
if (!columnConfig) {
|
|
253
|
-
console.log(key);
|
|
254
|
-
console.log(typeof value);
|
|
255
|
-
console.log(value instanceof InlineFile);
|
|
256
252
|
if (value instanceof InlineFile) {
|
|
257
253
|
const storedFile = await value.store();
|
|
258
254
|
row[key] = storedFile.toDbRecord();
|
package/src/ModelAPI.test.js
CHANGED
|
@@ -37,6 +37,14 @@ beforeEach(async () => {
|
|
|
37
37
|
CREATE TABLE author(
|
|
38
38
|
id text PRIMARY KEY,
|
|
39
39
|
name text NOT NULL
|
|
40
|
+
);
|
|
41
|
+
CREATE TABLE IF NOT EXISTS keel_storage(
|
|
42
|
+
id text NOT NULL,
|
|
43
|
+
filename text NOT NULL,
|
|
44
|
+
content_type text NOT NULL,
|
|
45
|
+
data bytea NOT NULL,
|
|
46
|
+
created_at timestamptz NOT NULL DEFAULT now(),
|
|
47
|
+
PRIMARY KEY (id)
|
|
40
48
|
);`.execute(db);
|
|
41
49
|
|
|
42
50
|
const tableConfigMap = {
|