This commit is contained in:
Saxon Fletcher committed 2025-02-17 20:26:52 +10:00
1 parent 0bedcab2f4
commit 6288e50d45
3 files changed
+1 -4

No files matched your search

@@ -12,7 +12,7 @@ export const generatePolicyCreateSQL = (policy: PostgresPolicy) => {
}
return `
CREATE OR ALTER POLICY "${policy.name}"
ALTER POLICY "${policy.name}"
ON "${policy.schema}"."${policy.table}"
AS ${policy.action}
FOR ${policy.command}
@@ -28,7 +28,6 @@ interface AIEditorProps {
}
const AIEditor = ({
id,
language = 'javascript',
value,
defaultValue = '',
@@ -42,7 +42,6 @@ export const EditorPanel = ({ onChange }: EditorPanelProps) => {
const [isSaving, setIsSaving] = useState(false)
const [error, setError] = useState<QueryResponseError>()
const [results, setResults] = useState<undefined | any[]>(undefined)
const [showResults, setShowResults] = useState(false)
const [showWarning, setShowWarning] = useState<'hasWriteOperation' | 'hasUnknownFunctions'>()
const [currentValue, setCurrentValue] = useState(editorPanel.initialValue || '')
const [showTemplates, setShowTemplates] = useState(false)
@@ -59,7 +58,6 @@ export const EditorPanel = ({ onChange }: EditorPanelProps) => {
const { mutate: executeSql, isLoading: isExecuting } = useExecuteSqlMutation({
onSuccess: async (res) => {
setShowResults(true)
setResults(res.result)
},
onError: (error) => {