Giter Site home page Giter Site logo

[Enhancement] Sync receipt about dotmim.sync HOT 2 CLOSED

mimetis avatar mimetis commented on May 22, 2024
[Enhancement] Sync receipt

from dotmim.sync.

Comments (2)

gentledepp avatar gentledepp commented on May 22, 2024 1

Yeah that perfectly makes sense. Thank you!

from dotmim.sync.

Mimetis avatar Mimetis commented on May 22, 2024

I don't think we can add a bit on the tracking tables.
A row in the tracking table is not related to one client.

You can have this information, at least, an approximation.
If you take the [scope_infog].[scope_timestamp] related to your client, you can compare with the table_tracking.[timestamp] value and determine if the row has been sent to the client.

Actually, this is how the selectchanges stored procedure is working.
Here is an extract:

([side] represents the tracking table)

WHERE (
	-- Update made by the local instance
	[side].[update_scope_id] IS NULL
	-- Or Update different from remote
	OR [side].[update_scope_id] <> @sync_scope_id
	-- Or we are in reinit mode so we take rows even thoses updated by the scope
	OR @sync_scope_is_reinit = 1
    )
AND (
	-- And Timestamp is > from remote timestamp
	[side].[timestamp] > @sync_min_timestamp
	OR
	-- remote instance is new, so we don't take the last timestamp
	@sync_scope_is_new = 1
	)
AND (
	[side].[sync_row_is_tombstone] = 1 
	OR
	([side].[sync_row_is_tombstone] = 0 AND [base].[CustomerID] is not null	)
)

Is that make senses ?

from dotmim.sync.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.