This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4b02423
commit 8b0f4de
Showing
14 changed files
with
104 additions
and
131 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
### Todo | ||
- [ ] Get Sets Name | ||
- [ ] Drop Set | ||
- [ ] Clean Set | ||
- [ ] Get Elements of a set | ||
- [ ] Count elements of a set | ||
- [ ] Remove Element from a set | ||
- [ ] Update Element from a set | ||
- [ ] Get All Keys | ||
- [ ] Get All Values | ||
- [ ] Create Snapshot | ||
- [ ] Create schedule Snapshot | ||
- [ ] End Snapshot | ||
- [ ] Find List of Elements from a set | ||
- [ ] Sort With Limit And Offset | ||
- [ ] regex search | ||
- [ ] Update list of elements from a set | ||
- [ ] Remove list of elements from a set | ||
- [ ] handles foreach operation on a set | ||
- [ ] HAVE QUERY => T/F | ||
|
||
|
||
### In Progress | ||
|
||
|
||
### ✓ Done |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package database | ||
|
||
import "time" | ||
|
||
type Element struct { | ||
value string | ||
time time.Time | ||
} | ||
|
||
func NewElement(v string) Element { | ||
return Element{value: v, time: time.Now()} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package database | ||
|
||
type set map[string]SubSet | ||
|
||
type Sets map[string]set | ||
|
||
func NewSets() *Sets { | ||
return &Sets{} | ||
} | ||
|
||
func newSet() *set { | ||
return &set{} | ||
} | ||
|
||
func (s *Sets) AddSet(name string) { | ||
(*s)[name] = *newSet() | ||
} | ||
|
||
func (s set) AddSubSet(name string) { | ||
(s)[name] = *NewSubSet() | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package database | ||
|
||
type SubSets map[string]SubSet | ||
type SubSet []Element | ||
|
||
func NewSubSets() SubSets { | ||
return SubSets{} | ||
} | ||
|
||
func NewSubSet() *SubSet { | ||
return &SubSet{} | ||
} | ||
|
||
func (db *Database) PushElement(s string, sb string, e Element) { | ||
r := db.Sets[s][sb] | ||
db.Sets[s][sb] = append(r, e) | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package core |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package src | ||
package core | ||
|
||
import ( | ||
"github.com/zurvan-lab/TimeTraceDB/utils" | ||
|
This file contains 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains 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