mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
Unexport Field.SetTimeQuantum
This commit is contained in:
parent
fc49d67c0b
commit
3faa51544a
2 changed files with 5 additions and 5 deletions
6
field.go
6
field.go
|
|
@ -396,7 +396,7 @@ func (f *Field) applyOptions(opt FieldOptions) error {
|
|||
f.options.Max = 0
|
||||
f.options.Keys = opt.Keys
|
||||
// Set the time quantum.
|
||||
if err := f.SetTimeQuantum(opt.TimeQuantum); err != nil {
|
||||
if err := f.setTimeQuantum(opt.TimeQuantum); err != nil {
|
||||
f.Close()
|
||||
return errors.Wrap(err, "setting time quantum")
|
||||
}
|
||||
|
|
@ -533,8 +533,8 @@ func (f *Field) TimeQuantum() TimeQuantum {
|
|||
return f.options.TimeQuantum
|
||||
}
|
||||
|
||||
// SetTimeQuantum sets the time quantum for the field.
|
||||
func (f *Field) SetTimeQuantum(q TimeQuantum) error {
|
||||
// setTimeQuantum sets the time quantum for the field.
|
||||
func (f *Field) setTimeQuantum(q TimeQuantum) error {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ func TestField_SetTimeQuantum(t *testing.T) {
|
|||
defer f.Close()
|
||||
|
||||
// Set & retrieve time quantum.
|
||||
if err := f.SetTimeQuantum(TimeQuantum("YMDH")); err != nil {
|
||||
if err := f.setTimeQuantum(TimeQuantum("YMDH")); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if q := f.TimeQuantum(); q != TimeQuantum("YMDH") {
|
||||
t.Fatalf("unexpected quantum: %s", q)
|
||||
|
|
@ -300,7 +300,7 @@ func TestField_RowTime(t *testing.T) {
|
|||
f := MustOpenField(OptFieldTypeTime(TimeQuantum("")))
|
||||
defer f.Close()
|
||||
|
||||
if err := f.SetTimeQuantum(TimeQuantum("YMDH")); err != nil {
|
||||
if err := f.setTimeQuantum(TimeQuantum("YMDH")); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue