Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Updating issue0005.test.coffee to test queries with larger result set. #20

Closed
wants to merge 1 commit into from

2 participants

@rickbergfalk

@cretz,

This test should provide a larger result set to use during testing. I'm not familiar with coffeescript, but I just replaced the t-sql, so everything should still work...

@cretz
Owner

Awesome, thanks. I will probably make another test case in the same file from this. I will let you know.
(for the system, this pull request applies to issue #5)

@cretz
Owner

I am closing this to handle it in the other issue

@cretz cretz closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 20 additions and 2 deletions.
  1. +20 −2 test/node-tds.issue0005.test.coffee
View
22 test/node-tds.issue0005.test.coffee
@@ -26,13 +26,31 @@ describe 'Statement', ->
conn.connect =>
# ask for 30000 results
sql = """
+ CREATE TABLE #tmp (
+ aNumber INT,
+ anotherNumber INT,
+ someText VARCHAR(250),
+ moreText VARCHAR(250),
+ aDateTime DATETIME,
+ aBit BIT
+ )
DECLARE @i INT
SET @i = 0
WHILE (@i < 1000)
BEGIN
- SELECT @i = @i + 1
- SELECT 'Test'
+ INSERT INTO #tmp
+ SELECT
+ 1,
+ 2,
+ 'wheeeee. some really long text to take up space. blah blah blah. some really long text to take up space. blah blah blah. some really long text to take up space. blah blah blah. some really long text to take up space.',
+ 'some really long text to take up space. blah blah blah. some really long text to take up space. blah blah blah. some really long text to take up space. blah blah blah. some really long text to take up space.',
+ GETDATE(),
+ 1
+
+ SET @i = @i + 1;
END
+ SELECT * FROM #tmp
+ DROP TABLE #tmp
"""
stmt = conn.createStatement sql, null, handler
stmt.execute()
Something went wrong with that request. Please try again.