对于我的问题,我使用json_aggin join 来聚合我的结果。但这会导致嵌套数组序列。
询问:
SELECT c.*,
json_agg(ci.national_id) AS national_id,
json_agg(a.address) AS address
FROM company AS c
LEFT JOIN
(SELECT company_id,
json_agg(json_build_object('value', national_id, 'country', country_code)) AS national_id
FROM company_identification
GROUP BY company_id) AS ci ON ci.company_id = c.id
LEFT JOIN
(SELECT company_id,
json_agg(address.*) AS address
FROM address
GROUP BY company_id) AS a ON a.company_id = c.id
GROUP BY c.id
Run Code Online (Sandbox Code Playgroud)
结果:
[
{
"id": "c876967d-dd8b-4068-88f4-57a438a2015c",
"name": "S.A.1",
"nationalId": [
[
{
"value": "string",
"country": "CL"
}
]
],
"address": [ …Run Code Online (Sandbox Code Playgroud) 我一直在为WebRtc使用getUserMedia()一段时间,但自从最新的浏览器更新以来我一直无法使用它.在以前的版本工作正常.
受影响的浏览器版本Firefox - 57.0.4,Chrome - 63.0.3239.132
示例代码:
navigator.getUserMedia({ "audio": true, "video": false }, function (stream) {
console.log(stream);
localStream = stream;
},logError);
Run Code Online (Sandbox Code Playgroud)
如果有人在谷歌示例代码https://webrtc.github.io/samples/src/content/getusermedia/gum/中收到此错误,请检查此项
这个问题有什么解决方法吗?需要帮忙.谢谢