https://github.com/azkadev/database_universe
Database Universe Library for help you save any data in anywhere with high performance speed, easy feature and ready for scala business
https://github.com/azkadev/database_universe
dart database documentdb flutter libmdbx rust sqlite
Last synced: 3 months ago
JSON representation
Database Universe Library for help you save any data in anywhere with high performance speed, easy feature and ready for scala business
- Host: GitHub
- URL: https://github.com/azkadev/database_universe
- Owner: azkadev
- License: apache-2.0
- Created: 2024-04-27T16:58:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T09:48:05.000Z (4 months ago)
- Last Synced: 2025-03-30T02:07:18.355Z (3 months ago)
- Topics: dart, database, documentdb, flutter, libmdbx, rust, sqlite
- Language: Dart
- Homepage: https://youtube.com/@azkadev
- Size: 57.2 MB
- Stars: 121
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Database Universe
![]()
Ultra Fast, Enjoyable & Cross Platform Database Universe
[](https://www.youtube.com/@Global_Corporation)
[](https://pub.dev/packages/database_universe)
**Database Universe** Library for help you save any data in anywhere with high performance speed, easy feature and ready for scala business
## Features
- đ **Work On Cross Platform**: Mobile, Desktop, Browser, Server Side
- ⥠**Good Performance and efficient**
- â¤ī¸ **Simple, Easey Powerfull, Can Extend To Scala Bussiness**### Information
This Library only update if there ae feature that i want, if you want library with full documentation so it usually **makes things easier DEVELOP PROGRAM** you just need to buy / donate at [Azkadev](https://github.com/sponsors/azkadev)
##
Fact
- This library is **very fast** and can be created on a business scale
## Example Project Use This Library
## Demo
## đī¸ Docs
1. [Documentation](/docs/)
2. [Youtube](https://youtube.com/@azkadev)
3. [Telegram Support Group](https://t.me/DEVELOPER_GLOBAL_PUBLIC)
4. [Contact Developer](https://github.com/azkadev) (check social media or readme profile github)## đī¸ Features
1. [x] đąī¸ **Cross Platform** support (Device, Web)
2. [x] đī¸ **Standarization** Style Code
3. [x] â¨ī¸ **Cli** (Terminal for help you use this library or create project)
4. [x] đĨī¸ **Api** (If you developer bot / userbot you can use this library without interact cli just add library and use đī¸)
5. [ ] đ§Šī¸ **Customizable Extension** (if you want add extension so you can more speed up on development)
6. [ ] â¨ī¸ **Pretty Information** (user friendly for newbie)
## âī¸ Fun Fact**This library 100%** use on every my create project (**App, Server, Bot, Userbot**)
## đī¸ Proggres
- **2024-05-11**## Guide on how to use this library
Before using this library, make sure you know basic coding
And your laptop has the programming language installed [dart](https://dart.dev)### đĨī¸ Install Library
1. **Dart**
```bash
dart pub add database_universe
```## đī¸ Quick Start
Example Quickstart script minimal for insight you or make you use this library because very simple
```dart
// ignore_for_file: unnecessary_brace_in_string_interps
import 'dart:io';
import 'package:database_universe/database_universe.dart';
import 'package:example/schema/database_scheme/chatbot_data_local_database.dart';
import 'package:general_lib/log/log.dart';void main() async {
final GeneralLibraryLog generalLibraryLog = GeneralLibraryLog(logOptions: GeneralLibraryLogOptions(textTitle: "", textContext: ""));
await DatabaseUniverse.initialize();
final DatabaseUniverse databaseUniverse = DatabaseUniverse.open(
schemas: [
ChatbotDataLocalDatabaseSchema,
],
directory: "temp",
);
final String prompt = "hello";
final String respond = "Hello Babe";
generalLibraryLog.printToTerminal(
logMessage: GeneralLibraryLogMessage(
value: "Get Data: ${prompt}",
isForcePrint: false,
stackTrace: StackTrace.current,
isFullDetail: false,
logMessageType: GeneralLibraryLogMessageType.info,
logOptions: null,
),
);final ChatbotDataLocalDatabase? chatbotDataLocalDatabaseOld = databaseUniverse.chatbotDataLocalDatabases.where().promptMatches(prompt, caseSensitive: false).findFirst();
if (chatbotDataLocalDatabaseOld == null) {
generalLibraryLog.printToTerminal(
logMessage: GeneralLibraryLogMessage(
value: "Data Prompt Not Found: ${prompt} ",
isForcePrint: false,
stackTrace: StackTrace.current,
isFullDetail: false,
logMessageType: GeneralLibraryLogMessageType.info,
logOptions: null,
),
);
final ChatbotDataLocalDatabase chatbotDataLocalDatabaseNew = ChatbotDataLocalDatabase();
chatbotDataLocalDatabaseNew.id = databaseUniverse.chatbotDataLocalDatabases.autoIncrement();
chatbotDataLocalDatabaseNew.prompt = prompt;
chatbotDataLocalDatabaseNew.respond = respond;
databaseUniverse.write((databaseUniverse) {
databaseUniverse.chatbotDataLocalDatabases.put(chatbotDataLocalDatabaseNew);
return;
});
} else {
generalLibraryLog.printToTerminal(
logMessage: GeneralLibraryLogMessage(
value: "Data Prompt Found: ${prompt} ",
isForcePrint: false,
stackTrace: StackTrace.current,
isFullDetail: false,
logMessageType: GeneralLibraryLogMessageType.info,
logOptions: null,
),
);
generalLibraryLog.printToTerminal(
logMessage: GeneralLibraryLogMessage(
value: """
Data DetailPrompt: ${chatbotDataLocalDatabaseOld.prompt}
Respond: ${chatbotDataLocalDatabaseOld.respond}
""".trim(),
isForcePrint: false,
stackTrace: StackTrace.current,
isFullDetail: false,
logMessageType: GeneralLibraryLogMessageType.info,
logOptions: null,
),
);
}
exit(0);
}
```Example Generate Schema script minimal for insight you or make you use this library because very simple
```dart
import 'dart:io';
import 'package:general_lib/general_lib.dart';
import "package:path/path.dart" as path;void main(List args) async {
final Directory directoryCurrent = Directory.current;
final Directory directorySchemes = Directory(path.join(directoryCurrent.path, "lib", "schema"));
directorySchemes.generalLibUtilsDangerRecreate();
{
final Directory directoryDatabaseScheme = Directory(path.join(directorySchemes.path, "database_scheme")).generalLibUtilsDangerRecreate();
for (final element in schemes) {
final generateSchema = jsonToDatabaseUniverse(
element,
className: "${element["@type"]}${GeneralLibSchemeType.local.toSpesialType()}",
);
await generateSchema.saveToFile(directoryDatabaseScheme);
}
}
{
Process.runSync(
"dart",
["pub", "get", "--offline"],
workingDirectory: directoryCurrent.path,
);
Process.runSync(
"dart",
[
"format",
".",
],
workingDirectory: directoryCurrent.path,
);
final result = await Process.start(
"dart",
[
"run",
"build_runner",
"build",
"--delete-conflicting-outputs",
],
workingDirectory: directoryCurrent.path,
);
result.stderr.listen(stderr.add);
result.stdout.listen(stdout.add);
int exitCode = await result.exitCode;
exit(exitCode);
}
}final List> schemes = [
{
"@type": "chatbotData",
"id": 0,
"prompt": "",
"respond": "",
},
];```