パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.1

dart_mssql

Dart 向けの高パフォーマンス Microsoft SQL Server ドライバー (32 および 64 ビット)

30日間ダウンロード
126
いいね数
32
Pub ポイント
40

パッケージをインストール

flutter pub add dart_mssql

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

dart_mssql は、Dart 向けの高性能 Microsoft SQL Server ドライバであり、32ビットおよび64ビットシステムをサポートしています。SQL Server データベースとの堅牢な相互作用を必要とする Dart アプリケーションに対して、スムーズなデータベース接続を可能にします。効率性と信頼性を重視して設計されており、サーバーサイドまたはデスクトップ環境で安全かつ高速なデータ操作を実現します。シンプルな API を使用することで、Flutter および他の Dart プロジェクトと円滑に統合できます。オープンソースの性質により、コミュニティによる貢献と透明性が確保されています。SQL Server をバックエンドとして利用するアプリケーションを開発する開発者にとって理想的です。

用途

  • FlutterアプリをSQL Serverデータベースに接続する
  • SQL Server 統合を活用したバックエンドサービスの構築
  • Dartで高速データベースクエリを実行する
  • レガシーアプリケーションのSQL ServerシステムをDartベースのソリューションに移行する
  • SQL Server アクセスを活用したクロスプラットフォームデスクトップアプリケーションの開発

主な機能

  • 32ビットおよび64ビットシステムをサポートしています
  • 高パフォーマンスデータベース操作
  • セキュアな接続処理
  • オープンソースでコミュニティ主導
  • SQL インタラクションのためのシンプルで直感的な API

適している対象

  • SQL Server をターゲットとする Dart 開発者
  • 信頼できるデータベースアクセスを必要とするバックエンドサービス
  • SQL Serverから高速でデータを取得する必要があるアプリケーション
  • Dart を使用するクロスプラットフォームデスクトップアプリ開発者
  • 既存のSQL Serverインフラストラクチャを持つDartへの移行チーム

注意事項

  • SQL Server に限定
  • モバイルプラットフォームに対する公式サポートなし
  • 完全な機能を実現するにはネイティブな依存関係が必要です
  • プラットフォーム固有のビルドが必要になる場合があります
  • SQL Server以外のデータベースには適していません

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

dart_mssql

High Performance Microsoft SQL Server (MS-SQL Server) Driver for Dart (32 & 64bits)

Important

  • This package is not suitable for flutter or web projects. It only runs on server-side apps.
  • It works only on Windows (32bits or 64bits)
  • You have to install OLE DB Driver
  • You have to install Microsoft Visual C++ Redistributable
  • dart_mssql_32.dll (32-bit) and dart_mssql_64.dll (64-bit) are the compiled versions of the driver. Rename to "dart_mssql.dll" according to your needs and copy it to the main directory of your project.

Example Usage

Demo code to perform Raw SQL queries

import 'dart:io';
import 'package:dart_mssql/dart_mssql.dart';

void main() async {
  SqlConnection connection = SqlConnection(host:"SERVERNAME", db:"DBNAME", user:"USERNAME", password:"PASSWORD");
  String cmd = "select email from usuario where id_usuario=?";
  
  SqlResult result = connection.execute(cmd,[4]);
  result.rows.forEach((e) {
    print("${e.email}");
  });
  print("end of printing.");
  connection.close();
  stdin.readLineSync();
}

Troubleshooting

Problem:
The specified module could not be found.
error: library handler failed

Cause:
Missing installing Microsoft OLE DB Driver OR missing dart_mssql.dll file into project main directory OR missing Microsoft Visual C++ Redistributable

Solution:
Copy dart_mssql.dll file into project main directory.


Problem:
%1 is not a valid Win32 application.
error: library handler failed

Cause:
incorrect dart_mssql.dll version (32 bits with dart VM 64 bits or vice versa)

Solution:
Copy correct dart_mssql.dll file into project main directory.


Compiling with Microsoft Visual Studio 2017 Community Edition

IF AND ONLY IF you want to compile library source code (C++ part) follow the instructions below:

  • Before compile, you have to install Windows 10 SDK on your Microsoft Visual Studio 2017 Community Edition
  • Open solution file dart_mssql\cpp\dart_mssql.sln with Microsoft Visual Studio 2017 Community Edition
  • On "Solution Explorer" Panel right click on dart_mssql project and select "Rebuild"
  • Put the generated dart_mssql.dll file into your project main folder (same folder of your pubspec.yaml file)
  • Be sure to have correct dart-sdk\bin folder (32 or 64 bits) in VC++ Directories -> Library Directories. Change "F:\DartSDK64\dart-sdk\bin" to your location
  • Be sure to have correct dart.lib version (32 or 64 bits) in Linker -> Input -> Additional Dependencies. Change "F:\DartSDK64\dart-sdk\bin\dart.lib" to your location

カテゴリー

依存関係

依存関係一覧 6 件

  • collection^1.14.11
  • meta^1.1.6
  • sql_recase^0.2.1
  • sql_result^0.2.2
  • sql_utils^0.2.0
  • string_utils^0.2.0

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。