We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 975cc8b commit 92881d8Copy full SHA for 92881d8
Tests/PostgreSQLTests/PostgreSQLConnectionTests.swift
@@ -588,6 +588,24 @@ class PostgreSQLConnectionTests: XCTestCase {
588
XCTAssert(result == Double(value))
589
}
590
591
+
592
+ func testRangeSelectDecodePerformance() throws {
593
+ struct Series: Decodable {
594
+ var num: Int
595
+ }
596
597
+ let conn = try PostgreSQLConnection.makeTest()
598
+ measure {
599
+ let decoder = PostgreSQLRowDecoder()
600
+ do {
601
+ try conn.simpleQuery("SELECT * FROM generate_series(1, 10000) num") { row in
602
+ _ = try decoder.decode(Series.self, from: row)
603
+ }.wait()
604
+ } catch {
605
+ XCTFail("\(error)")
606
607
608
609
610
static var allTests = [
611
("testBenchmark", testBenchmark),
0 commit comments