Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0e5c9b

Browse files
authored
Merge pull request#14 from microsoft/alphaChanges
Alpha changes
2 parents84f68e5 +a7c099b commite0e5c9b

32 files changed

+6634
-15
lines changed

‎.gitignore

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Ignore all files in the pybind/build directory
2+
mssql_python/pybind/build/
3+
4+
mssql_python/pybind/pymsbuild/build/
5+
6+
# Ignore pyd file
7+
mssql_python/ddbc_bindings.pyd
8+
9+
# Ignore pycache files and folders
10+
__pycache__/
11+
**/__pycache__/
12+
*.pyc
13+
14+
# Ignore pytest cache
15+
.pytest_cache/
16+
**/.pytest_cache/
17+
18+
# Ignore log files
19+
*.log
20+
21+
# Ignore Visual Studio files
22+
mssql_python/.vs
23+
.vs
24+
25+
# Ignore test-*.xml files
26+
test-*.xml
27+
**/test-**.xml
28+
29+
# Ignore the build & mssql_python.egg-info directories
30+
build/
31+
mssql_python.egg-info/

‎LICENSE

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
MIT License
2-
All files licensed under the MIT license except the dynamic-link libraries (DLLs) in the libs\win folder,
2+
All files licensed under the MIT license except the dynamic-link libraries (DLLs) in themssql_python\libs\win folder,
33
which are subject to different licensing terms. Please review the licensing details for each component below.
44

55
A. MIT License
@@ -27,7 +27,7 @@ SOFTWARE
2727

2828
B. MICROSOFT LICENSES
2929
==================================================================
30-
The following dynamic-link libraries (DLLs) in the libs\win folder fall under different Microsoft licenses.
30+
The following dynamic-link libraries (DLLs) in themssql_python\libs\win folder fall under different Microsoft licenses.
3131
Below is a breakdown of these components by their respective licenses.
3232

3333
1. Microsoft ODBC Driver 18 End User License Agreement (EULA)
@@ -37,11 +37,11 @@ These components are part of the Microsoft ODBC Driver 18 for SQL Server and are
3737
- msodbcdiag18.dll: Diagnostic library for handling error reporting and troubleshooting.
3838
- msodbcsql18.dll: Core ODBC driver enabling connectivity between SQL Server and applications.
3939

40-
For official licensing terms, refer to: libs\win\MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt
40+
For official licensing terms, refer to:mssql_python\libs\win\MICROSOFT_ODBC_DRIVER_FOR_SQL_SERVER_LICENSE.txt
4141

4242
2. Microsoft Visual C++ Redistributable EULA
4343
These components are part of the Microsoft Visual C++ Redistributable and are governed by the Microsoft Visual C++ Redistributable EULA.
4444

4545
- msvcp140.dll: Microsoft C++ Standard Library runtime, required for running C++ applications.
4646

47-
For redistribution and usage terms, refer to: libs\win\libs\win\MICROSOFT_VISUAL_STUDIO_LICENSE.txt
47+
For redistribution and usage terms, refer to:mssql_python\libs\win\libs\win\MICROSOFT_VISUAL_STUDIO_LICENSE.txt

‎README.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,12 @@ Connect to SQL Server and execute a simple query:
4747
import mssql_python
4848

4949
# Establish a connection
50-
connection= mssql_python.connect(
51-
server='your_server',
52-
database='your_database',
53-
username='your_username',
54-
password='your_password'
55-
)
50+
# Specify connection string
51+
connection= ("SERVER=<your_server_name>;DATABASE=<your_database_name>;UID=<your_user_name>;PWD=<your_password>;Encrypt=yes;")
5652

5753
# Execute a query
5854
cursor= connection.cursor()
59-
cursor.execute("SELECT* FROM your_table")
55+
cursor.execute("SELECT@@version")
6056
rows= cursor.fetchall()
6157

6258
for rowin rows:
@@ -86,7 +82,7 @@ For more information see the [Code of Conduct FAQ](https://opensource.microsoft.
8682
contact[opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
8783

8884
##License
89-
The mssql-python driver for SQL Server is licensed under the MIT license, except the dynamic-link libraries (DLLs) in the[libs](libs) folder
85+
The mssql-python driver for SQL Server is licensed under the MIT license, except the dynamic-link libraries (DLLs) in the[libs](https://github.com/microsoft/mssql-python/tree/alphaChanges/mssql_python/libs) folder
9086
that are licensed under MICROSOFT SOFTWARE LICENSE TERMS.
9187

9288
Please review the[LICENSE](LICENSE) file for more details.

‎mssql_python/__init__.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
"""
2+
Copyright (c) Microsoft Corporation.
3+
Licensed under the MIT license.
4+
This module initializes the mssql_python package.
5+
"""
6+
7+
# Exceptions
8+
# https://www.python.org/dev/peps/pep-0249/#exceptions
9+
from .exceptionsimport (
10+
Warning,
11+
Error,
12+
InterfaceError,
13+
DatabaseError,
14+
DataError,
15+
OperationalError,
16+
IntegrityError,
17+
InternalError,
18+
ProgrammingError,
19+
NotSupportedError,
20+
)
21+
22+
# Type Objects
23+
from .typeimport (
24+
Date,
25+
Time,
26+
Timestamp,
27+
DateFromTicks,
28+
TimeFromTicks,
29+
TimestampFromTicks,
30+
Binary,
31+
STRING,
32+
BINARY,
33+
NUMBER,
34+
DATETIME,
35+
ROWID,
36+
)
37+
38+
# Connection Objects
39+
from .connectionimportConnection
40+
from .db_connectionimportconnect
41+
42+
# Cursor Objects
43+
from .cursorimportCursor
44+
45+
# Logging Configuration
46+
from .logging_configimportsetup_logging,get_logger
47+
48+
# Constants
49+
from .constantsimportConstantsDDBC
50+
51+
# GLOBALS
52+
# Read-Only
53+
apilevel="2.0"
54+
paramstyle="qmark"
55+
threadsafety=1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp