Skip to content

test: Verify if .floor is necessary without ActiveRecord::Dirty#24

Closed
pimpin wants to merge 17 commits intomasterfrom
test_without_floor
Closed

test: Verify if .floor is necessary without ActiveRecord::Dirty#24
pimpin wants to merge 17 commits intomasterfrom
test_without_floor

Conversation

@pimpin
Copy link
Collaborator

@pimpin pimpin commented Nov 25, 2025

Objectif

Tester si le .floor ajouté dans lib/couchbase-orm/types/timestamp.rb est vraiment nécessaire ou si c'était un effet de bord de ActiveRecord::Dirty (PR #12).

Changements

  • Retrait de tous les .floor dans lib/couchbase-orm/types/timestamp.rb
  • Retrait du .floor(3) dans DateTimeWith3Decimal#cast (spec/type_spec.rb)

Résultat attendu

  • Si la CI passe : Le .floor était un effet de bord de AR::Dirty et peut être retiré
  • Si la CI échoue : Le .floor est nécessaire pour faire passer les tests

Note

Cette PR est un test exploratoire en branche depuis fix_save_return_for_nested pour valider l'hypothèse avant de finaliser la PR #12.

pimpin and others added 16 commits January 6, 2025 15:33
NB : in AR, the cast is done at assignment time. Lets try to do it.
TODO : fix move casting stuff from serialize and place them in cast obviously
And keep unchanged the serialize_value needed for queries (ie find_by_some_time)
- Remove double casting in create_setters to avoid type inconsistencies
- Fix Timestamp type precision by applying floor() during cast
- Fix DateTimeWith3Decimal precision handling in both cast and serialize

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@pimpin pimpin marked this pull request as ready for review November 25, 2025 17:11
@pimpin pimpin changed the base branch from fix_save_return_for_nested to master November 25, 2025 17:14
@pimpin pimpin marked this pull request as draft November 25, 2025 17:21
@pimpin
Copy link
Collaborator Author

pimpin commented Nov 27, 2025

Was for CI test only

@pimpin pimpin closed this Nov 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants