Allow constructing derived stream types with custom pageSize
This commit is contained in:
parent
1f49f1179d
commit
4b147d64a0
1 changed files with 2 additions and 4 deletions
|
|
@ -13,7 +13,7 @@ type
|
||||||
pages: Deque[OutputPage]
|
pages: Deque[OutputPage]
|
||||||
endPos: int
|
endPos: int
|
||||||
extCursorsCount: int
|
extCursorsCount: int
|
||||||
pageSize: int
|
pageSize*: int
|
||||||
maxWriteSize*: int
|
maxWriteSize*: int
|
||||||
minWriteSize*: int
|
minWriteSize*: int
|
||||||
|
|
||||||
|
|
@ -111,8 +111,7 @@ proc memoryOutput*(pageSize = defaultPageSize): OutputStreamHandle =
|
||||||
var stream = OutputStream(
|
var stream = OutputStream(
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
minWriteSize: 1,
|
minWriteSize: 1,
|
||||||
maxWriteSize: high(int),
|
maxWriteSize: high(int))
|
||||||
pages: initDeque[OutputPage]())
|
|
||||||
|
|
||||||
stream.initWithSinglePage()
|
stream.initWithSinglePage()
|
||||||
|
|
||||||
|
|
@ -166,7 +165,6 @@ proc fileOutput*(filename: string,
|
||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
minWriteSize: 1,
|
minWriteSize: 1,
|
||||||
maxWriteSize: high(int),
|
maxWriteSize: high(int),
|
||||||
pages: initDeque[OutputPage](),
|
|
||||||
file: f)
|
file: f)
|
||||||
|
|
||||||
stream.initWithSinglePage()
|
stream.initWithSinglePage()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue