Add ability to copy view definition

This commit is contained in:
Dan Sosedoff
2022-12-03 15:16:42 -06:00
parent 3cec2c5c66
commit bf6b2f8dda
2 changed files with 10 additions and 0 deletions

View File

@@ -273,6 +273,15 @@ function performViewAction(view, action, el) {
case "copy":
copyToClipboard(view.split('.')[1]);
break;
case "copy_def":
executeQuery("SELECT pg_get_viewdef('" + view + "', true);", function(data) {
if (data.error) {
alert(data.error);
return;
}
copyToClipboard(data.rows[0]);
});
break;
}
}