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

पैकेज विवरणv0.18.0

stormberry

एक स्ट्रॉन्गली-टाइप्ड पोस्टग्रेस ओआरएम जो आपके डार्ट क्लासेस और पोस्टग्रेस डेटाबेस के बीच आसान बाइंडिंग प्रदान करता है।

AndroidiOSmacOSWindowsLinux
30-दिन डाउनलोड
258
लाइक
138
Pub अंक
150

पैकेज इंस्टॉल करें

flutter pub add stormberry

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

स्टॉर्मबेरी एक स्ट्रॉन्गली-टाइप्ड पोस्टग्रेस के लिए डार्ट ओआरएम है जो डार्ट क्लास और पोस्टग्रेस डेटाबेस टेबल के बीच मैपिंग को सरल बनाता है। यह प्रकार सुरक्षित प्रश्न और स्कीमा प्रबंधन प्रदान करता है, बॉयलरप्लेट को कम करता है और रनटाइम त्रुटियों को न्यूनतम करता है। फ्लटर और डार्ट एप्लिकेशन में विश्वसनीय, बनाए रखने योग्य डेटाबेस इंटरैक्शन की तलाश करने वाले डेवलपर्स के लिए डिज़ाइन किया गया, स्टॉर्मबेरी प्रोफेशनल आईपी के माध्यम से पोस्टग्रेस के साथ बिना किसी दिक्कत के एकीकृत होता है। पैकेज एंड्रॉइड, आईओएस, मैकओएस, विंडोज और लिनक्स जैसे कई प्लेटफॉर्म को सपोर्ट करता है, जो क्रॉस-प्लेटफॉर्म एप्लिकेशन के लिए आदर्श है जिन्हें ठोस बैकएंड डेटा हैंडलिंग की आवश्यकता होती है।

उपयोग

  • PostgreSQL बैकएंड के साथ क्रॉस-प्लेटफॉर्म एप्लिकेशन बिल्ड करना
  • Flutter में प्रकार सुरक्षित डेटाबेस संचालन
  • स्कीमा माइग्रेशन को स्वचालित करना
  • डेटा लेयर कोड में बॉयलरप्लेट कम करना
  • Dart सेवाओं के साथ PostgreSQL का एकीकरण

मुख्य विशेषताएँ

  • स्ट्रॉन्गली-टाइप्ड एंटिटी मैपिंग
  • क्वेरी के लिए संकलन-समय सुरक्षा
  • प्लेटफॉर्म-अनुकूल डेटाबेस एक्सेस का समर्थन
  • एम्बेडेड माइग्रेशन उपकरण
  • साफ़, पढ़ने योग्य प्रश्न सिंटैक्स

इनके लिए उपयुक्त

  • PostgreSQL का उपयोग करने वाले Dart/Flutter विकासकर्मी
  • प्रकार सुरक्षा को प्राथमिकता देने वाली टीमें
  • स्केलेबल डेटा परतों की आवश्यकता वाले प्रोजेक्ट्स
  • संरचित डेटा मॉडल वाली बैकएंड सेवाएँ
  • स्थिर डेटाबेस स्कीमा प्रबंधन की आवश्यकता वाले अनुप्रयोग

विचार योग्य बातें

  • PostgreSQL सर्वर सेटअप की आवश्यकता है
  • पोस्टग्रेस के लिए सीमित (अन्य डेटाबेस के लिए नहीं)
  • ORM संकल्पनाओं के लिए सीखने का वक्र
  • ग्राहक एप्लिकेशन में स्थिर नेटवर्क कनेक्टिविटी पर निर्भर
  • जटिल स्कीमा के लिए अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Stormberry


A strongly-typed postgres ORM to provide easy bindings between your dart classes and postgres database. It supports all kinds of relations without any complex configuration.


Quick Start

To get started, add stormberry as a dependency and build_runner as a dev dependency:

dart pub add stormberry
dart pub add build_runner --dev

In your code, specify an abstract class that should act as a table like this:

// This file is "model.dart"
import 'package:stormberry/stormberry.dart';

// Will be generated by stormberry
part 'model.schema.dart';

@Model()
abstract class User {
  @PrimaryKey()
  String get id;

  String get name;
}

In order to generate the database code, run the following command:

dart run build_runner build

Tip: You'll need to re-run code generation each time you are making changes to your models. During development, you can use watch to automatically watch your changes: dart pub run build_runner watch.

This will generate a .schema.dart file that you should add as a part to the original model file.


Before running your application, you have to migrate your database. To do this run:

dart run stormberry migrate

This will ask you for the connection details of your postgres database and then migrate the database schema by adding the users table.


To access your database from your application, create a Database instance and use the users repository like this:

void main() async {
  
  var db = Database(
    // connection parameters go here
  );
  
  // adds a user to the 'users' table
  await db.users.insertOne(UserInsertRequest(id: 'abc', name: 'Alex'));
  
  // finds a user by its 'id'
  var user = await db.users.queryUser('abc');
  
  assert(user.name == 'Alex');
}

Full Documentation

See the full documentation here or jump directly to the topic you are looking for:

श्रेणियाँ

निर्भरताएँ

निर्भरता सूची 12 आइटम

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।