पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

GitHub रिपॉज़िटरीVaishnavDatir/sql_conn

sql_conn

sql_conn एक प्लगइन है जो फ्लटर एंड्रॉइड एप्लिकेशन को SQL सर्वर से जोड़ने के लिए है।

sql_conn प्रोजेक्ट कवर
स्टार
9
फ़ोर्क
14
अंतिम पुश (UTC)
30 जन॰ 2026
प्रोजेक्ट स्थिति
सक्रिय

मूल 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 🍀

भाषाएँ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 ↗