Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview release v6.1.3 #134

Merged
merged 48 commits into from
Jan 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
638ec21
Merge branch 'dev' of https://github.com/Microsoft/mssql-jdbc into dev
AfsanehR-zz Jan 9, 2017
bc94d2b
Merge branch 'dev' of https://github.com/Microsoft/mssql-jdbc into dev
AfsanehR-zz Jan 10, 2017
926ad00
bvt updates
AfsanehR-zz Jan 13, 2017
5809103
clean rounding
xiangyushawn Jan 13, 2017
9d0c483
bvt and testframework updates
AfsanehR-zz Jan 14, 2017
d7a623a
update connection test headers
xiangyushawn Jan 16, 2017
625d97d
Merge pull request #117 from v-xiangs/connection-test-headers
Jan 16, 2017
c49f28e
Merge pull request #118 from v-xiangs/decimal-rounding-cleanning
Jan 16, 2017
3ff9758
bvt test updates
AfsanehR-zz Jan 17, 2017
ef04a4b
removed comment
AfsanehR-zz Jan 17, 2017
f3a9b51
removed unused variables
AfsanehR-zz Jan 17, 2017
315e8ae
update to DBResultSet
AfsanehR-zz Jan 17, 2017
22e9eaf
when socket timeout occured, do not try the second round
xiangyushawn Jan 18, 2017
c8b4880
updates to sqlType and datetimeoffset creation
AfsanehR-zz Jan 18, 2017
995836f
Merge branch 'dev' of https://github.com/Microsoft/mssql-jdbc into dev
AfsanehR-zz Jan 18, 2017
85dd53d
Binary and Varbinary types for framework (#119)
Jan 18, 2017
1aa3438
test bulkcopy with csv
Jan 19, 2017
1498468
adding dbresultsetTypes enum and
AfsanehR-zz Jan 19, 2017
6d06af3
resolved conflicts and updated branch
AfsanehR-zz Jan 19, 2017
697d4eb
added binary/varbinary verification
AfsanehR-zz Jan 19, 2017
87f9960
Merge pull request #122 from v-xiangs/NullPointerException-in-case-of…
xiangyushawn Jan 20, 2017
b7a85ce
post review commits
AfsanehR-zz Jan 21, 2017
13e45e3
Merged branch bulkCSV into dev
Jan 24, 2017
e21face
formatted source code
Jan 24, 2017
e2cc5a6
updated datetimeoffset max,min
AfsanehR-zz Jan 24, 2017
14cc69e
coding formatter and license update
Jan 24, 2017
0faef74
Merge pull request #120 from v-afrafi/bvt
AfsanehR-zz Jan 25, 2017
5ae0113
changed ant script to not run tests.
AfsanehR-zz Jan 25, 2017
004e7f6
Merge pull request #123 from v-suhame/bulkCSV
Jan 25, 2017
8e36960
Merge pull request #125 from v-suhame/formatCode
Jan 25, 2017
b025434
Merge branch 'dev' of https://github.com/Microsoft/mssql-jdbc into dev
AfsanehR-zz Jan 26, 2017
a98aa37
Merged branch dev into dev
Jan 26, 2017
3932e35
BulkCopy Column Mapping
Jan 26, 2017
3cc214c
Use BulkCopyTestUtil
Jan 27, 2017
a4db3c0
Merge pull request #127 from v-ahibr/dev
Jan 27, 2017
6215af4
Merge pull request #126 from v-afrafi/dev
Jan 27, 2017
93903c5
formatted test framework files.
AfsanehR-zz Jan 27, 2017
de625f6
Code formatting
Jan 27, 2017
9ccfc69
Merge pull request #129 from v-ahibr/dev
AfsanehR-zz Jan 27, 2017
4e50405
formatted code.
AfsanehR-zz Jan 27, 2017
a84e501
skip bigint verification for appveyor intermittent failure.
AfsanehR-zz Jan 27, 2017
ba1b949
Merge pull request #130 from v-afrafi/bvt_intermittent_fail
Jan 27, 2017
cb4ec8a
Merge pull request #128 from v-afrafi/testframework_Formatting
Jan 27, 2017
c9a80e0
Update changelog and version numbers for 6.1.3 release
Jan 27, 2017
0d242b4
Merge pull request #131 from v-ahibr/dev
AfsanehR-zz Jan 27, 2017
3e3aca8
skip DBResultSet verification for now.
AfsanehR-zz Jan 30, 2017
8e941e9
Update README.md
Jan 30, 2017
c845b92
Merge pull request #132 from v-afrafi/bvt_verification
Jan 30, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)

## [6.1.3]
### Added
- Added Binary and Varbinary types to the jUnit test framework [#119](https://github.com/Microsoft/mssql-jdbc/pull/119)
- Added BulkCopy test cases for csv [#123](https://github.com/Microsoft/mssql-jdbc/pull/123)
- Added BulkCopy ColumnMapping test cases [#127](https://github.com/Microsoft/mssql-jdbc/pull/127)

### Changed
- Switched to clean rounding for bigDecimal [#118](https://github.com/Microsoft/mssql-jdbc/pull/118)
- Updated BVT tests to use jUnit test framework [#120](https://github.com/Microsoft/mssql-jdbc/pull/120)
- In case of socket timeout occurance, avoid connection retry [#122](https://github.com/Microsoft/mssql-jdbc/pull/122)
- Changed ant build file to skip tests [#126](https://github.com/Microsoft/mssql-jdbc/pull/126)

### Fixed Issues
- Fixed the inconsistent coding style [#4](https://github.com/Microsoft/mssql-jdbc/issues/4)
- Fixed NullPointerException in case when SocketTimeout occurs [#65](https://github.com/Microsoft/mssql-jdbc/issues/121)


## [6.1.2]
### Added
- Socket timeout implementation for both connection string and data source [#85](https://github.com/Microsoft/mssql-jdbc/pull/85)
Expand Down
53 changes: 31 additions & 22 deletions Coding_Guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The purpose of the Java Coding Standards is to create a collaboration baseline.

## 1. General

All **changed code**, must obey these *coding standards*. As we have huge legacy code we will have code which defers Coding Standards.
All **changed code**, must obey these *coding standards*. As we have huge legacy code we will have code which defers Coding Standards. Eclipse code formatter [mssql-jdbc_formatter.xml](mssql-jdbc_formatter.xml) must be used to format the **changed code**, except for [enum types](#EnumSpec).

## 2. Comments

Expand All @@ -19,17 +19,19 @@ We should give appropriate java comments in code. Please find ideal example of j

```java
/**
* Get property-only names that do not work with connection String
* @param name to normalize
* Get property-only names that do not work with connection String
*
* @param name
* to normalize
* @param logger
* @return the normalized property name
*/
static String getPropertyOnlyName(String name, Logger logger) {
if(null == name) {
static String getPropertyOnlyName(String name, Logger logger) {
if (null == name) {
return name;
}
... some complex logic
}
}
```

**Incorrect:**
Expand All @@ -49,24 +51,12 @@ We should give appropriate java comments in code. Please find ideal example of j
All Java files should contain the appropriate copyright notice at the beginning of the file.

```java
/**
* File Name: {File_Name}
* Created : ${date}
*
/*
* Microsoft JDBC Driver for SQL Server
* The MIT License (MIT)
* Copyright(c) ${year} Microsoft Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
* Copyright(c) Microsoft Corporation All rights reserved.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
* ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
* THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* This program is made available under the terms of the MIT License. See the LICENSE file in the project root for more information.
*/
```

Expand Down Expand Up @@ -225,7 +215,7 @@ List people = Arrays.asList("you", "me");

Consider the use of common design patterns.

### 5.1. Enums
### 5.1. Enums <a name="EnumSpec"></a>

Constrain arguments by using type safe enumerations.

Expand All @@ -243,7 +233,26 @@ public enum Options {
String yes = "YES";
String no = "NO";
```
<br />
enum value with multiple constants must be alligned such that the constant of same type from all the values must be alligned in same column.

**Correct:**
```java
public enum SqlType{
VARCHAR ("varchar", JDBCType.VARCHAR),
NVARCHAR ("nvarchar", JDBCType.NVARCHAR),
CHAR ("char", JDBCType.CHAR);
}
```

**Incorrect**
```java
public enum SqlType {
VARCHAR("varchar", JDBCType.VARCHAR),
NVARCHAR("nvarchar", JDBCType.NVARCHAR),
CHAR("char", JDBCType.CHAR);
}
```

### 5.2. Private Helpers

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright(c) 2016 Microsoft Corporation
Copyright(c) 2017 Microsoft Corporation
All rights reserved.

MIT License
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ What's coming next? We will look into adding a more comprehensive set of tests,
* An instance of SQL Server or Azure SQL Database that you can connect to.

### Build the JAR files
The build automatically triggers a set of verification tests to run. For these tests to pass, you will first need to add an environment variable in your system called `mssql_jdbc_test_connection_properties` to provide the [correct connection properties](https://msdn.microsoft.com/en-us/library/ms378428(v=sql.110).aspx) for your SQL Server or Azure SQL Database instance.
Maven and Gradle builds automatically trigger a set of verification tests to run. For these tests to pass, you will first need to add an environment variable in your system called `mssql_jdbc_test_connection_properties` to provide the [correct connection properties](https://msdn.microsoft.com/en-us/library/ms378428(v=sql.110).aspx) for your SQL Server or Azure SQL Database instance.

To build the jar files, you must use Java 8 with either Ant (with Ivy), Maven or Gradle. You can choose to build a JDBC 4.1 compliant jar file (for use with JRE 7) and/or a JDBC 4.2 compliant jar file (for use with JRE 8).

Expand Down Expand Up @@ -116,6 +116,11 @@ If you wish to limit the number of run-time dependencies, and your project does
</dependency>
```

## Guidelines for Creating Pull Requests
We love contributions from the community. To help improve the quality of our code, we encourage you to use the mssql-jdbc_formatter.xml formatter provided on all pull requests.

Thank you!

## Guidelines for Reporting Issues
We appreciate you taking the time to test the driver, provide feedback and report any issues. It would be extremely helpful if you:

Expand Down
11 changes: 8 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'java'

archivesBaseName = 'mssql-jdbc'
version = '6.1.2'
version = '6.1.3'

allprojects {
tasks.withType(JavaCompile) {
Expand Down Expand Up @@ -51,6 +51,13 @@ sourceSets {
include 'META-INF/services/java.sql.Driver'
}
}
test {
resources {
srcDirs 'src/test/resources'
include '**/*.csv'
output.resourcesDir = output.classesDir
}
}
}

//Get dependencies from Maven central repository
Expand All @@ -71,5 +78,3 @@ dependencies {
'org.junit.jupiter:junit-jupiter-api:5.0.0-M3',
'org.junit.jupiter:junit-jupiter-engine:5.0.0-M3'
}


62 changes: 1 addition & 61 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
</description>
<!-- set global properties for this build -->
<property name="artifactId" value="mssql-jdbc"/>
<property name="version" value="6.1.2"/>
<property name="version" value="6.1.3"/>

<property name="src" location="src/main/java"/>
<property name="build" location="build"/>
<property name="bvtTest" location="src/test/java/com/microsoft/sqlserver/jdbc/bvt/"/>
<property name="bvtTest_Classes" location="${build}/classes/test/bvt"/>

<!-- download dependencies -->
<ivy:resolve>
Expand All @@ -35,7 +33,6 @@
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
<mkdir dir="${build}/classes"/>
<mkdir dir="${bvtTest_Classes}"/>
</target>

<target name="compile" depends="init"
Expand Down Expand Up @@ -75,7 +72,6 @@
<fileset dir="${build}/classes/jdbc41"/>
<metainf dir="META-INF"/>
</jar>
<antcall target="Test41"/>
</target>

<target name="build42" description="generate the distribution">
Expand All @@ -94,7 +90,6 @@
<fileset dir="${build}/classes/jdbc42"/>
<metainf dir="META-INF"/>
</jar>
<antcall target="Test42"/>
</target>

<target name="build" description="generate the distribution">
Expand All @@ -103,61 +98,6 @@
<antcall target="build42"/>
</target>

<target name="compile_test"
description="compile the junit source">
<javac classpathref="${JDBC_VERSION}" srcdir="${bvtTest}"
destdir="${bvtTest_Classes}"
encoding="UTF-8"
source="${JAVA_VERSION}"
target="${JAVA_VERSION}"
description="compiling the junit source" >
</javac>
</target>

<target name="Test41" >
<antcall target="compile_test">
<param name="JAVA_VERSION" value="1.7"/>
<param name="JDBC_VERSION" value="test_classpath41"/>
</antcall>
<junit haltonfailure="true" printsummary="true" showoutput="true" fork="true">
<formatter type="plain" usefile="false" />
<classpath><path refid="test_classpath41" /></classpath>
<test name="com.microsoft.sqlserver.jdbc.bvt.bvtTest"></test>
</junit>
</target>

<target name="Test42" >
<antcall target="compile_test">
<param name="JAVA_VERSION" value="1.8"/>
<param name="JDBC_VERSION" value="test_classpath42"/>
</antcall>
<junit haltonfailure="true" printsummary="true" showoutput="true" fork="true">
<formatter type="plain" usefile="false" />
<classpath><path refid="test_classpath42" /></classpath>
<test name="com.microsoft.sqlserver.jdbc.bvt.bvtTest"></test>
</junit>
</target>

<path id="test_classpath41">
<path location="${build}">
<fileset dir="${build}" includes="${artifactId}-${version}.jre7.jar"></fileset>
</path>
<path location="lib">
<fileset dir="lib" includes="*.jar"></fileset>
</path>
<path location="${bvtTest_Classes}"></path>
</path>

<path id="test_classpath42">
<path location="${build}">
<fileset dir="${build}" includes="${artifactId}-${version}.jre8.jar"></fileset>
</path>
<path location="lib">
<fileset dir="lib" includes="*.jar"></fileset>
</path>
<path location="${bvtTest_Classes}"></path>
</path>

<target name="clean"
description="clean up">
<delete dir="${build}"/>
Expand Down
Loading