Skip to content

Defining time ranges

ablakeman edited this page Nov 16, 2018 · 2 revisions

Overview

By default SETT will export all commits from a Store repository. This process can take quite a while depending on many factors (EG. size of database, latency of database, local disk speed, etc.). SETT supports multiple ways of defining time ranges of commits to export, examples of which are listed below.

Commits from all time

source := SettExampleSourceConfiguration new.
destination := SettExampleDestinationConfiguration new.

Sett 
  readCodeFrom: source
  andWriteTo: destination.

Commits starting at a specific date

source := SettExampleSourceConfiguration new.
destination := SettExampleDestinationConfiguration new.

Sett
  readCodePublishedSince: (DateAndTime fromString: 'Jan 1 2018')
  from: source
  andWriteTo: destination.

Commits for a specific time range

source := SettExampleSourceConfiguration new.
destination := SettExampleDestinationConfiguration new.

Sett 
 readCodePublishedBetweenStartDateAndTime: (DateAndTime fromString: 'Jan 1 2018')
 andEndDateAndTime:  (DateAndTime fromString: 'Jan 10 2018')
 from: source
 andWriteTo: destination.