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

Sync master branch with update4 branch #508

Merged
merged 11 commits into from
Dec 2, 2022
10 changes: 5 additions & 5 deletions ballerina/Ballerina.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
org = "ballerinax"
name = "mssql"
version = "1.6.1"
version = "1.7.0"
authors = ["Ballerina"]
keywords = ["database", "client", "network", "SQL", "RDBMS", "SQLServer", "MSSQL"]
repository = "https://github.com/ballerina-platform/module-ballerinax-mssql"
Expand All @@ -12,11 +12,11 @@ distribution = "2201.3.0"
[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "mssql-native"
version = "1.6.1"
path = "../native/build/libs/mssql-native-1.6.1.jar"
version = "1.7.0"
path = "../native/build/libs/mssql-native-1.7.0-SNAPSHOT.jar"

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
artifactId = "sql-native"
version = "1.6.0"
path = "./lib/sql-native-1.6.0.jar"
version = "1.7.0"
path = "./lib/sql-native-1.7.0-20221104-172000-addd057.jar"
2 changes: 1 addition & 1 deletion ballerina/CompilerPlugin.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ id = "mssql-compiler-plugin"
class = "io.ballerina.stdlib.mssql.compiler.MSSQLCompilerPlugin"

[[dependency]]
path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.6.1.jar"
path = "../compiler-plugin/build/libs/mssql-compiler-plugin-1.7.0-SNAPSHOT.jar"
4 changes: 2 additions & 2 deletions ballerina/Dependencies.toml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ dependencies = [
[[package]]
org = "ballerina"
name = "sql"
version = "1.6.0"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "io"},
{org = "ballerina", name = "jballerina.java"},
Expand Down Expand Up @@ -385,7 +385,7 @@ modules = [
[[package]]
org = "ballerinax"
name = "mssql"
version = "1.6.1"
version = "1.7.0"
dependencies = [
{org = "ballerina", name = "crypto"},
{org = "ballerina", name = "file"},
Expand Down
2 changes: 1 addition & 1 deletion build-config/resources/Ballerina.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ keywords = ["database", "client", "network", "SQL", "RDBMS", "SQLServer", "MSSQL
repository = "https://github.com/ballerina-platform/module-ballerinax-mssql"
icon = "icon.png"
license = ["Apache-2.0"]
distribution = "2201.3.0"
distribution = "2201.4.0"

[[platform.java11.dependency]]
groupId = "io.ballerina.stdlib"
Expand Down
1 change: 1 addition & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
- [Remove SQL_901 diagnostic hint](https://github.com/ballerina-platform/ballerina-standard-library/issues/3609)

## [1.6.1] - 2022-12-01

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import io.ballerina.projects.environment.Environment;
import io.ballerina.projects.environment.EnvironmentBuilder;
import io.ballerina.tools.diagnostics.Diagnostic;
import io.ballerina.tools.diagnostics.DiagnosticInfo;
import io.ballerina.tools.diagnostics.DiagnosticSeverity;
import org.testng.Assert;
import org.testng.annotations.Test;
Expand Down Expand Up @@ -59,34 +58,6 @@ private Package loadPackage(String path) {
return project.currentPackage();
}

@Test
public void testFunctionHints() {
Package currentPackage = loadPackage("sample1");
PackageCompilation compilation = currentPackage.getCompilation();
DiagnosticResult diagnosticResult = compilation.diagnosticResult();
long availableErrors = diagnosticResult.diagnostics().stream()
.filter(r -> r.diagnosticInfo().severity().equals(DiagnosticSeverity.ERROR)).count();
Assert.assertEquals(availableErrors, 3);

List<Diagnostic> diagnosticHints = diagnosticResult.diagnostics().stream()
.filter(r -> r.diagnosticInfo().severity().equals(DiagnosticSeverity.HINT))
.collect(Collectors.toList());
long availableHints = diagnosticHints.size();
Assert.assertEquals(availableHints, 3);

DiagnosticInfo hint1 = diagnosticHints.get(0).diagnosticInfo();
Assert.assertEquals(hint1.code(), MSSQLDiagnosticsCode.MSSQL_901.getCode());
Assert.assertEquals(hint1.messageFormat(), MSSQLDiagnosticsCode.MSSQL_901.getMessage());

DiagnosticInfo hint2 = diagnosticHints.get(1).diagnosticInfo();
Assert.assertEquals(hint2.code(), MSSQLDiagnosticsCode.MSSQL_902.getCode());
Assert.assertEquals(hint2.messageFormat(), MSSQLDiagnosticsCode.MSSQL_902.getMessage());

DiagnosticInfo hint3 = diagnosticHints.get(2).diagnosticInfo();
Assert.assertEquals(hint3.code(), MSSQLDiagnosticsCode.MSSQL_901.getCode());
Assert.assertEquals(hint3.messageFormat(), MSSQLDiagnosticsCode.MSSQL_901.getMessage());
}

@Test
public void testSQLConnectionPoolFieldsInNewExpression() {
Package currentPackage = loadPackage("sample2");
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import io.ballerina.projects.plugins.CodeAnalyzer;
import io.ballerina.stdlib.mssql.compiler.analyzer.InitializerParamAnalyzer;
import io.ballerina.stdlib.mssql.compiler.analyzer.RecordAnalyzer;
import io.ballerina.stdlib.mssql.compiler.analyzer.RemoteMethodAnalyzer;

import java.util.List;

Expand All @@ -34,7 +33,6 @@ public class MSSQLCodeAnalyzer extends CodeAnalyzer {

@Override
public void init(CodeAnalysisContext ctx) {
ctx.addSyntaxNodeAnalysisTask(new RemoteMethodAnalyzer(), SyntaxKind.REMOTE_METHOD_CALL_ACTION);
ctx.addSyntaxNodeAnalysisTask(new InitializerParamAnalyzer(),
List.of(SyntaxKind.IMPLICIT_NEW_EXPRESSION, SyntaxKind.EXPLICIT_NEW_EXPRESSION));
ctx.addSyntaxNodeAnalysisTask(new RecordAnalyzer(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import io.ballerina.tools.diagnostics.DiagnosticSeverity;

import static io.ballerina.tools.diagnostics.DiagnosticSeverity.ERROR;
import static io.ballerina.tools.diagnostics.DiagnosticSeverity.HINT;

/**
* Enum class to hold MSSQL module diagnostic codes.
Expand All @@ -34,10 +33,7 @@ public enum MSSQLDiagnosticsCode {
SQL_103("SQL_103", "invalid value: expected value is greater than or equal to 30", ERROR),

MSSQL_101("MSSQL_101", "invalid value: expected value is greater than or equal to zero", ERROR),
MSSQL_102("MSSQL_102", "invalid value: expected value is greater than or equal to -1", ERROR),

MSSQL_901("MSSQL_901", "parameter 'rowType' should be explicitly passed when the return data is ignored", HINT),
MSSQL_902("MSSQL_902", "parameter 'returnType' should be explicitly passed when the return data is ignored", HINT);
MSSQL_102("MSSQL_102", "invalid value: expected value is greater than or equal to -1", ERROR);

private final String code;
private final String message;
Expand Down

This file was deleted.

6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
group=io.ballerina.stdlib
version=1.6.2-SNAPSHOT
version=1.7.0-SNAPSHOT

puppycrawlCheckstyleVersion=8.18
msSQLDriverVersion=9.2.0.jre11
Expand All @@ -11,9 +11,9 @@ researchgateReleaseVersion=2.8.0
testngVersion=7.4.0
ballerinaGradlePluginVersion=0.15.0

ballerinaLangVersion=2201.3.0
ballerinaLangVersion=2201.4.0-20221104-003000-4b73c40e

stdlibSqlVersion=1.6.0
stdlibSqlVersion=1.7.0-20221130-000500-de190e4

# Direct Dependencies
# Level 01
Expand Down