Merge branch 'master' of github.com:budibase/budibase into datadog-bull
This commit is contained in:
commit
ca66acbb27
|
@ -2276,6 +2276,25 @@ if (descriptions.length) {
|
||||||
expect(updated.attachment.key).toBe(newAttachment.key)
|
expect(updated.attachment.key).toBe(newAttachment.key)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should allow updating signature row", async () => {
|
||||||
|
const { table, row } = await coreAttachmentEnrichment(
|
||||||
|
{
|
||||||
|
signature: {
|
||||||
|
type: FieldType.SIGNATURE_SINGLE,
|
||||||
|
name: "signature",
|
||||||
|
constraints: { presence: false },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"signature",
|
||||||
|
`${uuid.v4()}.png`
|
||||||
|
)
|
||||||
|
|
||||||
|
const newSignature = generateAttachment(`${uuid.v4()}.png`)
|
||||||
|
row["signature"] = newSignature
|
||||||
|
const updated = await config.api.row.save(table._id!, row)
|
||||||
|
expect(updated.signature.key).toBe(newSignature.key)
|
||||||
|
})
|
||||||
|
|
||||||
it("should allow enriching attachment list rows", async () => {
|
it("should allow enriching attachment list rows", async () => {
|
||||||
await coreAttachmentEnrichment(
|
await coreAttachmentEnrichment(
|
||||||
{
|
{
|
||||||
|
|
|
@ -371,8 +371,7 @@ class SqlServerIntegration extends Sql implements DatasourcePlus {
|
||||||
? `${query.sql}; SELECT SCOPE_IDENTITY() AS id;`
|
? `${query.sql}; SELECT SCOPE_IDENTITY() AS id;`
|
||||||
: query.sql
|
: query.sql
|
||||||
this.log(sql, query.bindings)
|
this.log(sql, query.bindings)
|
||||||
const resp = await request.query(sql)
|
return await request.query(sql)
|
||||||
return resp
|
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
let readableMessage = getReadableErrorMessage(
|
let readableMessage = getReadableErrorMessage(
|
||||||
SourceName.SQL_SERVER,
|
SourceName.SQL_SERVER,
|
||||||
|
|
|
@ -30,4 +30,12 @@ export const SWITCHABLE_TYPES: SwitchableTypes = {
|
||||||
FieldType.LONGFORM,
|
FieldType.LONGFORM,
|
||||||
],
|
],
|
||||||
[FieldType.NUMBER]: [FieldType.NUMBER, FieldType.BOOLEAN],
|
[FieldType.NUMBER]: [FieldType.NUMBER, FieldType.BOOLEAN],
|
||||||
|
[FieldType.JSON]: [
|
||||||
|
FieldType.JSON,
|
||||||
|
FieldType.ARRAY,
|
||||||
|
FieldType.ATTACHMENTS,
|
||||||
|
FieldType.ATTACHMENT_SINGLE,
|
||||||
|
FieldType.BB_REFERENCE,
|
||||||
|
FieldType.SIGNATURE_SINGLE,
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,6 +128,7 @@ export enum FieldType {
|
||||||
export const JsonTypes = [
|
export const JsonTypes = [
|
||||||
FieldType.ATTACHMENT_SINGLE,
|
FieldType.ATTACHMENT_SINGLE,
|
||||||
FieldType.ATTACHMENTS,
|
FieldType.ATTACHMENTS,
|
||||||
|
FieldType.SIGNATURE_SINGLE,
|
||||||
// only BB_REFERENCE is JSON, it's an array, BB_REFERENCE_SINGLE is a string type
|
// only BB_REFERENCE is JSON, it's an array, BB_REFERENCE_SINGLE is a string type
|
||||||
FieldType.BB_REFERENCE,
|
FieldType.BB_REFERENCE,
|
||||||
FieldType.JSON,
|
FieldType.JSON,
|
||||||
|
|
Loading…
Reference in New Issue