Skip to content
This repository has been archived by the owner on Jun 18, 2020. It is now read-only.

Commit

Permalink
Add License info and update README
Browse files Browse the repository at this point in the history
Added a copyright and license header to each source file.

Renamed LICENSE.txt to just LICENSE.

Modified the LICENSE file to be more terminal friendly
by wrapping at 80 columns.

Updated the README to include running tests and remove no longer relevant
instructions.
  • Loading branch information
jkint committed Jun 7, 2012
1 parent 908fc51 commit 67b1557
Show file tree
Hide file tree
Showing 23 changed files with 439 additions and 36 deletions.
14 changes: 14 additions & 0 deletions LICENSE
@@ -0,0 +1,14 @@
Copyright 2012 Microsoft Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you
may not use this file except in compliance with the License. You may
obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied. See the License for the specific language governing
permissions and limitations under the License.

9 changes: 0 additions & 9 deletions LICENSE.txt

This file was deleted.

27 changes: 0 additions & 27 deletions README

This file was deleted.

78 changes: 78 additions & 0 deletions README.md
@@ -0,0 +1,78 @@
# Microsoft Driver for Node.js for SQL Server

The Microsoft Driver for Node.js for SQL Server allows Node.js applications on
Microsoft Windows and Microsoft Windows Azure to access Microsoft SQL Server
and Microsoft Windows Azure SQL Database.

This is an initial preview release, and is not production ready. We welcome any
feedback, fixes and contributions from the community at this very early stage.

## Prerequisites

The following prerequisites are necessary prior to using the driver:

* Node.js - use the latest version if possible, but it has been tested on node
0.6.10 and later

* node-gyp - latest version installed globally (npm install -g node-gyp)

* python 2.7.x - for node-gyp (make sure it is in the path)

* Visual C++ 2010 - the Express edition is freely available from
[Microsoft][visualstudio]

* SQL Server Native Client 11.0 - available as Microsoft SQL Server 2012
Native Client found in the [SQL Server 2012 Feature Pack][sqlncli]

## Build

To build the driver, first node-gyp must configure the appropriate build files.

node-gyp configure

Use node-gyp to build the driver:

node-gyp build

Or to build the debug version:

node-gyp build --debug

Then copy the sqlserver.node file from the build\\(Release|Debug) directory to
the lib directory. If you would like to use Visual C++ to debug the driver,
also copy the sqlserver.pdb file from the same directory.

## Test

Included are a few unit tests. They require mocha, async, and assert to be
installed via npm. Also, set the variables in test-config.js, then run the
tests as follows:

cd test
node runtests.js

## Known Issues

We are aware that many features are still not implemented, and are working to
update these. Please visit the [project on Github][project] to view
outstanding [issues][issues].

## Usage

For now, please see the unit tests for usage examples.

## License

The Microsoft Driver for Node.js for SQL Server is licensed under the Apache
2.0 license. See the LICENSE file for more details.

[visualstudio]: http://www.microsoft.com/visualstudio/

[sqlncli]: http://www.microsoft.com/en-us/download/details.aspx?id=29065

[project]: https://github.com/windowsazure/node-sqlserver

[issues]: https://github.com/windowsazure/node-sqlserver/issues



19 changes: 19 additions & 0 deletions lib/sql.js
@@ -1,3 +1,22 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: sql.js
// Contents: javascript interface to Microsoft Driver for Node.js for SQL Server
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

var sql = require('./sqlserver.node');
var events = require('events');
var util = require('util');
Expand Down
18 changes: 18 additions & 0 deletions src/Column.h
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: Column.h
// Contents: Column objects from SQL Server to return as Javascript types
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

Expand Down
18 changes: 18 additions & 0 deletions src/Connection.cpp
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: Connection.cpp
// Contents: C++ interface to Microsoft Driver for Node.js for SQL Server
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#include "stdafx.h"
#include "Connection.h"
Expand Down
19 changes: 19 additions & 0 deletions src/Connection.h
@@ -1,3 +1,22 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: Connection.h
// Contents: C++ interface to Microsoft Driver for Node.js for SQL Server
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

#include "OdbcConnectionBridge.h"
Expand Down
18 changes: 18 additions & 0 deletions src/OdbcConnection.cpp
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcConnection.cpp
// Contents: Async calls to ODBC done in background thread
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#include "stdafx.h"
#include "OdbcConnection.h"
Expand Down
18 changes: 18 additions & 0 deletions src/OdbcConnection.h
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcConnection.h
// Contents: Async calls to ODBC done in background thread
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

Expand Down
19 changes: 19 additions & 0 deletions src/OdbcConnectionBridge.h
@@ -1,3 +1,22 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcConnectionBridge.h
// Contents: Create (bridge) operations to be completed on background thread queue
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

#include "Operation.h"
Expand Down
18 changes: 18 additions & 0 deletions src/OdbcException.cpp
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcException.cpp
// Contents: Create exception from ODBC error(s)
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#include "stdafx.h"
#include "OdbcException.h"
Expand Down
18 changes: 18 additions & 0 deletions src/OdbcException.h
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcException.h
// Contents: Exception created from ODBC error(s)
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

Expand Down
18 changes: 18 additions & 0 deletions src/OdbcHandle.h
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcHandle.h
// Contents: Object to manage ODBC handles
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

Expand Down
18 changes: 18 additions & 0 deletions src/OdbcOperation.cpp
@@ -1,3 +1,21 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcOperation.cpp
// Contents: Functions called by thread queue for background ODBC operations
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#include "stdafx.h"
#include "OdbcOperation.h"
Expand Down
19 changes: 19 additions & 0 deletions src/OdbcOperation.h
@@ -1,3 +1,22 @@
//---------------------------------------------------------------------------------------------------------------------------------
// File: OdbcOperation.h
// Contents: ODBC Operation objects called on background thread
//
// Copyright Microsoft Corporation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
//
// You may obtain a copy of the License at:
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//---------------------------------------------------------------------------------------------------------------------------------

#pragma once

#include "Operation.h"
Expand Down

0 comments on commit 67b1557

Please sign in to comment.