Skip to content
Snippets Groups Projects
Commit df48845a authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

added get_all_series

parent 2b26774d
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ So no variable encoding for you! ...@@ -17,6 +17,7 @@ So no variable encoding for you!
## v0.2 ## v0.2
* added `get_open_series` * added `get_open_series`
* added `get_all_series`
## v0.1 ## v0.1
......
...@@ -21,7 +21,7 @@ def find_pyx(*path) -> tp.List[str]: ...@@ -21,7 +21,7 @@ def find_pyx(*path) -> tp.List[str]:
# #
setup(name='tempsdb', setup(name='tempsdb',
version='0.2_a2', version='0.2_a3',
packages=['tempsdb'], packages=['tempsdb'],
install_requires=['satella>=2.14.21', 'ujson'], install_requires=['satella>=2.14.21', 'ujson'],
ext_modules=build([Multibuild('tempsdb', find_pyx('tempsdb')), ], ext_modules=build([Multibuild('tempsdb', find_pyx('tempsdb')), ],
......
...@@ -15,6 +15,7 @@ cdef class Database: ...@@ -15,6 +15,7 @@ cdef class Database:
unsigned long entries_per_chunk, unsigned long entries_per_chunk,
int page_size=*) int page_size=*)
cpdef list get_open_series(self) cpdef list get_open_series(self)
cpdef list get_all_series(self)
cpdef Database create_database(str path) cpdef Database create_database(str path)
...@@ -75,6 +75,17 @@ cdef class Database: ...@@ -75,6 +75,17 @@ cdef class Database:
result.register_memory_pressure_manager(self.mpm) result.register_memory_pressure_manager(self.mpm)
return result return result
cpdef list get_all_series(self):
"""
Stream all series available within this database
.. versionadded:: 0.2
:return: a list of series names
:rtype: tp.List[str]
"""
return os.listdir(self.path)
cpdef TimeSeries create_series(self, str name, int block_size, cpdef TimeSeries create_series(self, str name, int block_size,
unsigned long entries_per_chunk, unsigned long entries_per_chunk,
int page_size=4096): int page_size=4096):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment