패키지, 저장소 및 앱 카테고리 검색

GitHub 저장소VaishnavDatir/sql_conn

sql_conn

sql_conn은 Flutter Android 애플리케이션을 SQL Server에 연결하기 위한 플러그인입니다.

sql_conn 프로젝트 이미지
스타
9
포크
14
최근 푸시(UTC)
2026. 1. 30.
프로젝트 상태
활성

원본 README

아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.

sql_conn

sql_conn is a production-ready Flutter plugin that allows Android applications to connect directly to SQL SERVER databases using JDBC.

It provides a clean, type-safe, null-safe Dart API powered by Pigeon, and a high-performance Android backend.

This plugin is designed for LAN / internal network / enterprise / industrial use-cases where direct database connectivity from a mobile device is required.


✨ Features

  • Android-only direct SQL connectivity
  • Database support:
    • Microsoft SQL Server
  • Prepared statements (parameterized queries)
  • Stored procedure execution
  • SQL script / batch execution
  • Fully null-safe Dart API
  • Type-safe Flutter ↔ Android bridge using Pigeon

📱 Platform Support

Platform Support
Android ✅ Yes
iOS 🚧 Under construction
Web 💭 Planning
Windows 🚫 No
MacOs 🚫 No

Direct database connections from mobile apps should only be used in trusted or internal networks.


🚀 Installation

Add to pubspec.yaml:

dependencies:
  sql_conn: ^2.0.0

⚙️ Basic Usage

Connect to a database
await SqlConn.connect(
  connectionId: "mainDB",
  host: "192.168.1.10",
  port: 1433,
  database: "MyDatabase",
  username: "admin",
  password: "Password@123",
);
Read data
final rows = await SqlConn.read(
  "mainDB",
  "SELECT * FROM users WHERE role = ?",
  params: ["admin"],
);

print(rows);
Write / Update / Delete
final count = await SqlConn.write(
  "mainDB",
  "UPDATE users SET active = ? WHERE id = ?",
  params: [true, 101],
);

print("Rows affected: $count");
Call Stored Procedure
final result = await SqlConn.callProcedure(
  "mainDB",
  "sp_generate_report",
  params: [2026, "JAN"],
);
Execute SQL Script
await SqlConn.executeScript(
  "mainDB",
  """
  CREATE TABLE logs(id INT, message VARCHAR(255));
  CREATE INDEX idx_logs ON logs(id);
  """,
);
Disconnect
await SqlConn.disconnect("mainDB");
🧩 Multiple Connections
await SqlConn.connect(connectionId: "db1", dbType: DatabaseType.sqlServer, ...);
await SqlConn.connect(connectionId: "db2", dbType: DatabaseType.postgres, ...);

final a = await SqlConn.read("db1", "SELECT * FROM table1");
final b = await SqlConn.read("db2", "SELECT * FROM table2");
🔧 Custom JDBC URL
await SqlConn.connect(
  connectionId: "legacy",
  host: "",
  port: 0,
  database: "",
  username: "sysdba",
  password: "masterkey",
  customJdbcUrl: "jdbc:firebirdsql://192.168.1.9/employee",
);

🧠 State Management

sql_conn is a stateless service API. You can integrate it with any state manager:

  • Provider
  • Riverpod
  • Bloc
  • GetX
  • Service Locators
  • Connection lifecycle is fully controlled by your app.

⚡ Performance

  • Prepared statement reuse
  • Non-blocking platform channel
  • Minimal memory overhead

🔐 Security

  • Prepared statements prevent SQL injection
  • No credential logging
Vaishnav Datir GitHub avatar
GitHub 작성자

Vaishnav Datir ↗

Tech-enthusiast and programmer. Mobile Application Developer 📱 Flutter 💙 Android Studio 😉 Node Js, Express, TypeScript 🚀 Java, Spring boot 🍀

Navi Mumbai, Maharashtra, INDIA공식 웹사이트 ↗
언어DartKotlin

분류

이 저장소가 배포한 패키지

사용 중인 의존성

의존성 목록 4 개

  • flutter{"sdk":"flutter"}
  • flutter_test개발 의존성{"sdk":"flutter"}
  • pigeon개발 의존성^26.1.7
  • flutter_lints개발 의존성^3.0.0

프로젝트에 맞는 저장소를 선택하려면?

사용 목적에 따라 검색하고 개발 활동을 비교한 뒤 원본 저장소에서 요구 사항을 확인하세요.

  1. 이름, 작성자 또는 설명으로 검색하고 기술 주제로 범위를 좁힙니다.
  2. 스타, 포크, 최근 푸시를 함께 비교하세요. 스타는 관심의 지표이며 품질을 보장하지 않습니다.
  3. 사용하기 전에 GitHub에서 README, 라이선스, Issues를 확인하세요.

출처 및 관리

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗