Skip to content

gh-1825 Add tntcxx submodule and publish C++ connector Getting started #1852

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

Merged
merged 4 commits into from
Feb 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ apikey.txt
/locale/ru/LC_MESSAGES/reference/reference_rock/luatest/modules/
/locale/ru/LC_MESSAGES/reference/reference_rock/luatest/classes/

# tntcxx submodule

/doc/getting_started/getting_started_cxx.rst
/doc/getting_started/_includes/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

У нас же уже есть файлы в этой директории? Если и нет, то может появиться. Если что-то приходит из tntcxx, пусть оно ложится в директорию cxx или cxx/_includes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай пока так оставим на эту итерацию. Если сейчас поменять структуру, нужно в нескольких местах исправлять пути, в т.ч. в сорсах документа.

3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "modules/grafana-dashboard"]
path = modules/grafana-dashboard
url = https://github.com/tarantool/grafana-dashboard
[submodule "modules/tntcxx"]
path = modules/tntcxx
url = https://github.com/tarantool/tntcxx.git
1 change: 1 addition & 0 deletions doc/book/connectors/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,4 @@ script:
.. include:: __c.rst

.. include:: __results.rst

11 changes: 6 additions & 5 deletions doc/getting_started/getting_started_connectors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@
Connecting from your favorite language
================================================================================

In the :doc:`previous section </getting_started/getting_started_db>`,
In the :doc:`previous sections </getting_started/getting_started_db>`,
you have learned how to create a Tarantool database.
Now let's see how to connect to it from Python, PHP, and Go.
Now let's see how to connect to the database from different programming
languages, such as Python, PHP, Go, and C++, and
execute typical requests for manipulating the data (select, insert, delete,
and so on).

.. toctree::
:maxdepth: 2
Expand All @@ -15,6 +18,4 @@ Now let's see how to connect to it from Python, PHP, and Go.
getting_started_python
getting_started_php
getting_started_go



getting_started_cxx
1 change: 1 addition & 0 deletions modules/tntcxx
Submodule tntcxx added at 7c5e89
7 changes: 7 additions & 0 deletions update_submodules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ luatest_dest="${project_root}/doc/reference/reference_rock/luatest"
cartridge_kubernetes_root="${project_root}/modules/tarantool-operator/doc/cartridge_kubernetes_guide"
cartridge_kubernetes_dest="${rst_dest}/"

tntcxx_root="${project_root}/modules/tntcxx"
tntcxx_gs_dest="${project_root}/doc/getting_started/"
tntcxx_api_dest="${project_root}/doc/book/connectors/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А это пока что не копируем, да?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

пока не копируем контент по API сюда, т.к. он еще в драфтовом виде.
tntcxx_api_dest="${project_root}/doc/book/connectors/"


cd "${luatest_root}"
ldoc --ext=rst --dir=rst --toctree="API" .
cd "${luatest_dest}"
Expand All @@ -46,6 +50,9 @@ yes | cp -rf "${cartridge_cli_root}/README.rst" "${cartridge_cli_index_dest}"
mkdir -p "${cartridge_kubernetes_dest}"
yes | cp -rf "${cartridge_kubernetes_root}" "${cartridge_kubernetes_dest}"

yes | cp -rf "${tntcxx_root}/doc/tntcxx_getting_started.rst" "${tntcxx_gs_dest}/getting_started_cxx.rst"
yes | cp -rf "${tntcxx_root}/examples/" "${tntcxx_gs_dest}/_includes/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Тут можно сначала создать директорию getting_started/cxx/, а потом в нее копировать examples как _includes

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

давай пока так оставим на эту итерацию. Если сейчас поменять структуру, нужно в нескольких местах это исправлять, в т.ч. в сорсах документа.


cd "${cartridge_root}" || exit
tarantoolctl rocks install \
https://raw.githubusercontent.com/tarantool/LDoc/tarantool/ldoc-scm-2.rockspec \
Expand Down