Какой URL-адрес для подключения к SQL Серверу? - PullRequest
0 голосов
/ 06 апреля 2020

Я использую Peewee в качестве поставщика ORM для моих Python 3.x проектов. Peewee поддерживает создание базы данных соединение с URL и поддерживаются все базы данных по умолчанию, например

sqlite:///my_database.db will create a SqliteDatabase instance for the file my_database.db in the current directory.
sqlite:///:memory: will create an in-memory SqliteDatabase instance.
postgresql://postgres:my_password@localhost:5432/my_database will create a PostgresqlDatabase instance. A username and password are provided, as well as the host and port to connect to.
mysql://user:passwd@ip:port/my_db will create a MySQLDatabase instance for the local MySQL database my_db.

Я также использую расширение peewee-ms sql для доступа к базе данных SQL Server, но нет документации о том, как создать соединение по URL. Кто-нибудь знает? например,

sqlserver://<server>:<port>;databaseName=AdventureWorks;user=<user>;password=<password>
...