-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHRAS-2069 rescan file metadata command #4420
Conversation
} | ||
|
||
$stmt->execute(); | ||
$rows = $stmt->fetchAll(\PDO::FETCH_ASSOC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beware of big databoxes : better read row by row, and get only the needed column record_id
->addOption('source', null, InputOption::VALUE_REQUIRED, 'tag to search exemple IPTC:KEYWORD') | ||
->addOption('destination', null, InputOption::VALUE_REQUIRED, "ID of the field de fill") | ||
->addOption('overwrite', null, InputOption::VALUE_NONE, "act even if the destination field has a value in databox") | ||
->addOption('multi', null, InputOption::VALUE_REQUIRED, "replace or merge for multi value field") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be --method :
- replace : overwrite the whole value with new one(s)
- merge : for multi only = merge actual and new values
- prepend : for mono only = add before (to do later because need to enhance setMetaByActions() )
- append : for mono only = add after (to do later)
|
||
$sql_where = join(" AND ", $clauses); | ||
|
||
$sql = "SELECT * FROM record WHERE " . $sql_where; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't use * ;
overwrite = null optim: ... left join metadata... where ... and isnull(metadata)
so the select will not fetch records with value(s).
Changelog
Adds