diff --git a/source/includes/table-sql-to-mongo-insert-examples.yaml b/source/includes/table-sql-to-mongo-insert-examples.yaml index 40c3d60f8ae..96972896859 100644 --- a/source/includes/table-sql-to-mongo-insert-examples.yaml +++ b/source/includes/table-sql-to-mongo-insert-examples.yaml @@ -16,9 +16,9 @@ sql1: | .. code-block:: sql - INSERT INTO users(user_id, - age, - status) + INSERT INTO users(user_id, + age, + status) VALUES ("bcd001", 45, "A") @@ -26,10 +26,10 @@ mongo1: | .. code-block:: javascript :emphasize-lines: 1-5 - db.users.insert( { - user_id: "bcd001", - age: 45, - status: "A" + db.users.insert( { + user_id: "bcd001", + age: 45, + status: "A" } ) ref1: | See :method:`insert() ` diff --git a/source/includes/table-sql-to-mongo-schema-examples.yaml b/source/includes/table-sql-to-mongo-schema-examples.yaml index 5d3b2d50bdb..7277eacf8ee 100644 --- a/source/includes/table-sql-to-mongo-schema-examples.yaml +++ b/source/includes/table-sql-to-mongo-schema-examples.yaml @@ -113,8 +113,9 @@ ref4: | sql5: | .. code-block:: sql - CREATE INDEX idx_user_id_asc_age_desc - ON users(name, age DESC) + CREATE INDEX + idx_user_id_asc_age_desc + ON users(user_id, age DESC) mongo5: | .. code-block:: javascript :emphasize-lines: 1 diff --git a/source/reference/sql-comparison.txt b/source/reference/sql-comparison.txt index feea668981e..caa7979dada 100644 --- a/source/reference/sql-comparison.txt +++ b/source/reference/sql-comparison.txt @@ -7,26 +7,25 @@ SQL to MongoDB Mapping Chart Executables ----------- -The following table presents a quick reference to the MySQL/Oracle -executables and the corresponding MongoDB executables. +The following table presents the MySQL/Oracle executables and the +corresponding MongoDB executables. .. include:: /includes/table-sql-to-mongo-executables.rst Terminology/Concepts -------------------- -The following table presents a quick reference of the various SQL -terminology and concepts and the corresponding MongoDB terminology and -concepts. +The following table presents the various SQL terminology and concepts +and the corresponding MongoDB terminology and concepts. .. include:: /includes/table-sql-to-mongo-terms.rst Examples -------- -The following table presents a quick reference of the various SQL -statements and the corresponding MongoDB statements. The examples in -the table assume the following conditions: +The following table presents the various SQL statements and the +corresponding MongoDB statements. The examples in the table assume the +following conditions: - The SQL examples assume a table ``users``. @@ -42,47 +41,43 @@ the table assume the following conditions: status: 'A' } -Create and Alter Table -~~~~~~~~~~~~~~~~~~~~~~ +Create and Alter +~~~~~~~~~~~~~~~~ -The following table presents a quick reference of the various SQL -statements related to table-level actions and the corresponding MongoDB -statements. +The following table presents the various SQL statements related to +table-level actions and the corresponding MongoDB statements. .. include:: /includes/table-sql-to-mongo-schema-examples.rst -Insert into Table -~~~~~~~~~~~~~~~~~ +Insert +~~~~~~ -The following table presents a quick reference of the various SQL -statements related to inserting records into tables and the -corresponding MongoDB statements. +The following table presents the various SQL statements related to +inserting records into tables and the corresponding MongoDB statements. .. include:: /includes/table-sql-to-mongo-insert-examples.rst -Select from Table -~~~~~~~~~~~~~~~~~ +Select +~~~~~~ -The following table presents a quick reference of the various SQL -statements related to reading records from tables and the corresponding -MongoDB statements. +The following table presents the various SQL statements related to +reading records from tables and the corresponding MongoDB statements. .. include:: /includes/table-sql-to-mongo-select-examples.rst -Update Records in Table -~~~~~~~~~~~~~~~~~~~~~~~ +Update Records +~~~~~~~~~~~~~~ -The following table presents a quick reference of the various SQL -statements related to updating existing records in tables and the -corresponding MongoDB statements. +The following table presents the various SQL statements related to +updating existing records in tables and the corresponding MongoDB +statements. .. include:: /includes/table-sql-to-mongo-update-examples.rst -Delete Records from Table -~~~~~~~~~~~~~~~~~~~~~~~~~ +Delete Records +~~~~~~~~~~~~~~ -The following table presents a quick reference of the various SQL -statements related to deleting records from tables and the -corresponding MongoDB statements. +The following table presents the various SQL statements related to +deleting records from tables and the corresponding MongoDB statements. .. include:: /includes/table-sql-to-mongo-delete-examples.rst diff --git a/themes/epub_mongodb/static/epub.css b/themes/epub_mongodb/static/epub.css index e12b6937116..838aeb6050b 100644 --- a/themes/epub_mongodb/static/epub.css +++ b/themes/epub_mongodb/static/epub.css @@ -392,45 +392,29 @@ div.highlight-javascript>div.highlight>pre>span.hll>span.nx { font-weight: bold; } -/* Specific to the SQL to ... Mapping pages -- Begin */ +/* No Longer just Specific to the SQL to ... Mapping pages -- Begin */ -div#sql-to-aggregation-framework-mapping-chart td pre, -div#sql-to-mongo-mapping-chart td pre { +div td pre { border: none; -webkit-box-shadow: none; -moz-box-shadow: none; margin: 0px; - padding: 5px; + padding-top: 0px; + padding-right: 8px; background-color: transparent; } -div#sql-to-aggregation-framework-mapping-chart table.docutils, -div#sql-to-mongo-mapping-chart table.docutils { - border-collapse:collapse; - border:1px solid black; -} - -div#sql-to-aggregation-framework-mapping-chart table.docutils>colgroup>col, -div#sql-to-mongo-mapping-chart table.docutils>colgroup>col { - border-collapse:collapse; - border-left:1px solid black; +table.docutils td{ + padding: 8px; } -div#sql-to-aggregation-framework-mapping-chart table.docutils>thead th.head, -div#sql-to-mongo-mapping-chart table.docutils>thead th.head{ +table.docutils>thead th.head{ padding-top: 5px; padding-bottom: 5px; - background-color: #F7F2E0; + background-color: #F3F4EB; } -div#sql-to-mongo-mapping-chart div#examples.section table.docutils { - width: 85%; -} - -div#sql-to-mongo-mapping-chart div#examples.section table.docutils>colgroup>col:first-child { - width: 33%; -} -/* Specific to the SQL to ... Mapping page -- End */ +/* No longer just Specific to the SQL to ... Mapping page -- End */ /* -- math display ---------------------------------------------------------- */ diff --git a/themes/mongodb/static/mongodb-docs.css_t b/themes/mongodb/static/mongodb-docs.css_t index 85b020b8b3e..53eacc7513d 100644 --- a/themes/mongodb/static/mongodb-docs.css_t +++ b/themes/mongodb/static/mongodb-docs.css_t @@ -319,45 +319,29 @@ div.highlight-javascript>div.highlight>pre>span.hll>span.nx { font-weight: bold; } -/* Specific to the SQL to ... Mapping pages -- Begin */ +/* No Longer just Specific to the SQL to ... Mapping pages -- Begin */ -div#sql-to-aggregation-framework-mapping-chart td pre, -div#sql-to-mongo-mapping-chart td pre { +div td pre { border: none; -webkit-box-shadow: none; -moz-box-shadow: none; margin: 0px; - padding: 5px; + padding-top: 0px; + padding-right: 8px; background-color: transparent; } -div#sql-to-aggregation-framework-mapping-chart table.docutils, -div#sql-to-mongo-mapping-chart table.docutils { - border-collapse:collapse; - border:1px solid black; +table.docutils td{ + padding: 8px; } -div#sql-to-aggregation-framework-mapping-chart table.docutils>colgroup>col, -div#sql-to-mongo-mapping-chart table.docutils>colgroup>col { - border-collapse:collapse; - border-left:1px solid black; -} - -div#sql-to-aggregation-framework-mapping-chart table.docutils>thead th.head, -div#sql-to-mongo-mapping-chart table.docutils>thead th.head{ +table.docutils>thead th.head{ padding-top: 5px; padding-bottom: 5px; - background-color: #F7F2E0; -} - -div#sql-to-mongo-mapping-chart div#examples.section table.docutils { - width: 85%; + background-color: #F3F4EB; } -div#sql-to-mongo-mapping-chart div#examples.section table.docutils>colgroup>col:first-child { - width: 33%; -} -/* Specific to the SQL to ... Mapping page -- End */ +/* No Longer Specific to the SQL to ... Mapping page -- End */ /* for main page to knock out the bullets & padding for main columns */