From 166922f74a65d5dffa7da39f3cfdf4f905015ab5 Mon Sep 17 00:00:00 2001 From: Grisha Kruglov Date: Fri, 6 Jul 2018 16:16:13 -0400 Subject: [PATCH] Fixed formatting --- Transacting:-entity-to-SQL-translation.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Transacting:-entity-to-SQL-translation.md b/Transacting:-entity-to-SQL-translation.md index 787a459..aabf894 100644 --- a/Transacting:-entity-to-SQL-translation.md +++ b/Transacting:-entity-to-SQL-translation.md @@ -104,24 +104,25 @@ We handle a few entity types specially. * `[:db/retractAttribute e a]`: - We have SQLite insert into `after_search` roughly as follows: - ```sql +We have SQLite insert into `after_search` roughly as follows: +```sql INSERT INTO after_search SELECT e, a, v, value_type_tag, RETRACTED, EXACT_MATCH, rowid, v, value_type_tag FROM datoms WHERE e = :e AND a = :a - ``` +``` * `[:db/retractEntity e]`: - We have SQLite insert into `after_search` as follows: - ```sql +We have SQLite insert into `after_search` as follows: +```sql INSERT INTO after_search SELECT e, a, v, value_type_tag, RETRACTED, EXACT_MATCH, rowid, v, value_type_tag FROM datoms WHERE e = :e OR (v = :e AND value_type_tag = REF) ``` - It would be possible to generalize the search step above to do this search as part of the main search, but it's likely to be less efficient. + +It would be possible to generalize the search step above to do this search as part of the main search, but it's likely to be less efficient. ## Updating the transactions and datoms tables