Skip to content

auto-executing queries is dangerous #162

Closed
@dbu

Description

@dbu

when copy-pasting a query like this:

UPDATE [nt:unstructured] AS a INNER JOIN [nt:unstructured] AS t ON ISCHILDNODE(t, a) 
SET expr('row.getNode("t").setProperty("originalLinkCaption", row.getNode("a").getPropertyValue("originalLinkCaption"))') 
WHERE a.[phpcr:class] = 'Liipch\MagazineBundle\Document\Article' ;

it gets already executed after the first row. if i had UPDATE and SET on the same line (and working) but not the WHERE, this could lead to data destruction.

i propose that as with mysql/postgres clients, we only evaluate the query after seeing ;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions