Ada→C++ migration phase 1: ADO core, Parameters, SQL + parity tests - #2
Open
vibhaseshadri-cognition wants to merge 1 commit into
Open
vibhaseshadri-cognition wants to merge 1 commit into
vibhaseshadri-cognition wants to merge 1 commit into
Conversation
… SQL with parity tests Co-Authored-By: Vibha Seshadri <vibha.seshadri@cognition.ai>
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Kicks off an incremental Ada → C++17 port of Ada Database Objects, living side by side with the Ada sources under
cpp/. This PR ports the dependency-free foundation (manifest phase 1) and sets up the structure for every later slice.Ported (Ada → C++)
ADO→ado.hpp(Identifier,EntityType,ObjectId,Nullable<T>,Blob/BlobRef,Time)ADO.Utils,ADO.Dialects→utils.hpp,dialects.hpp(abstractDialectwith default string/bool escaping)ADO.Parameters→parameters.hpp:Parameter=std::variantover the Ada discriminated record;AbstractList/List;Expanderinterface;expand()reproduces the Ada expander exactly (?,:nnn,:name,$group[name],\xescapes; missing param →"").ADO.SQL→sql.hpp:Buffer(reserved-name quoting),Query,UpdateQuery(save_field/append_fieldsupdate+insert modes),read_file.Util.Logreplaced by a minimal pluggable sink (log.hpp) — no external deps.Parity tests —
regtests/src/ado-parameters-tests.adbandado-sql-tests.adbare mirrored incpp/tests/with expected strings copied verbatim (incl.Long_Float'Image→' 1.50000000000000E+00',Calendar.Formatting.Imagefraction format). ExtraBuffer/Query/UpdateQuerygeneration tests added. All pass under-Wall -Wextra -Wpedantic -Werror:Migration scaffolding
cpp/MIGRATION.md: type-mapping table, 7-phase manifest of all 32 Ada packages + drivers (LOC, target, status), component notes.cpp/PORTING_PLAYBOOK.md: phased, verifiable per-package porting procedure to reuse for each subsequent PR..github/workflows/cpp.yml: g++/clang++ CMake build + ctest (path-filtered tocpp/).Notes for reviewers:
Identifierislong long(notint64_t) sobind_param(Identifier)resolves unambiguously against theLong_Long_Integeroverload on Linux. Named parameters occupy list positions, so?counts them — this matches Ada and is asserted intest_query.No Ada sources or Ada regtests were modified.
Devin-Org: engineering
Link to Devin session: https://app.devin.ai/sessions/a807609f1fdf4ecea7e14dfb45a8f2b1
Open in Devin Desktop: https://app.devin.ai/desktop/session/a807609f1fdf4ecea7e14dfb45a8f2b1?variant=devin
Requested by: @vibhaseshadri-cognition