Javascript 用pg promise在Postgre中铸造UUID柱
我正在尝试使用pg promise中的ColumnSet()更新数据,但总是得到Javascript 用pg promise在Postgre中铸造UUID柱,javascript,node.js,uuid,pg-promise,Javascript,Node.js,Uuid,Pg Promise,我正在尝试使用pg promise中的ColumnSet()更新数据,但总是得到 错误:“id\u urutan”列的类型为uuid,但表达式的类型为text 是的,我知道我的id\u urutan是UUID,但我不知道如何将表达式转换为UUID。 当我尝试使用这个代码进行强制转换时,它得到错误无法将id\u urutan强制转换为uuid 这是我最后一次使用ColumSet const cs = new dbconfig.pgp.helpers.ColumnSet([{name :'id_ur
错误:“id\u urutan”列的类型为uuid,但表达式的类型为text
是的,我知道我的id\u urutan
是UUID,但我不知道如何将表达式转换为UUID。
当我尝试使用这个代码进行强制转换时,
它得到错误无法将id\u urutan强制转换为uuid
这是我最后一次使用ColumSet
const cs = new dbconfig.pgp.helpers.ColumnSet([{name :'id_urutan',cnd:true, cast:'text'}, 'nomor_ujian_mahasiswa', 'urutan', 'id_station', 'id_tran_sesi_ujian_station'], {table: 'urutan_ujian_mahasiswa'});
谢谢。表达式的确切含义是什么?它是text[],所以我将它转换为text
text[]
?它是'id\u urutan'表达式类型const cs=new dbconfig.pgp.helpers.ColumnSet(['?id\u urutan']);
如果我这样设置表达式'id\u urutan',它将被读取为text[]
type表达式到底是什么?它是text[],所以我将它转换为text在text[]中是什么
?它是'id\u urutan'表达式类型const cs=new dbconfig.pgp.helpers.ColumnSet(['?id\u urutan']);
如果我像这样设置表达式'id\u urutan',它将被读取为text[]