atreeon / easy_orm Goto Github PK
View Code? Open in Web Editor NEWdart orm for postgresql
dart orm for postgresql
Hello,
just noted that on a table with arrays the generated stub ignores the column?
BTW is this project still alive?
Hello
i found that you can do a Db.persons.insertRecords([onePerson], cn: db);
there's just a problem with my setting, id is serial, so if i insert a new record, i do not set the id and let postgres handle this for me, but for easyorm id is int and not int? so i can't specify a new record, how am i supposed to do it?
Seems like postgres data type "float8" is not being handled.
Any reason for that?
I tried setting up a simple dart program to test the package but i got the following error :
PathNotFoundException: Cannot open file, path = 'config/local_test_db.yaml' (OS Error: No such file or directory, errno = 2)
Here is my main :
import 'package:easy_orm_postgres/easy_orm_postgres.dart';
import 'package:easy_orm_postgres/service/SqlResponse.dart';
import 'package:hello/generatedDb/db/Db.dart';
import 'package:hello/generatedDb/models/Organization.dart';
Future<int> main() async {
try {
var connection = PostgreSQLConnection('localhost', 5432, 'db_name', username: 'username', password: 'password');
await connection.open();
final res = await Db().organization.selectQuery();
print((res as SqlResponse_Success<List<Organization>>).result);
connection.close();
return 0;
} catch (e) {
print("error : ${e.toString()}");
return 84;
}
}
Pubspec.yaml :
name: hello
description: A sample command-line application.
version: 1.0.0
environment:
sdk: ^3.0.3
dependencies:
easy_orm_postgres: ^0.4.0
dev_dependencies:
build_runner: ^2.4.5
freezed: ^2.3.5
json_serializable: ^6.7.0
lints: ^2.0.0
test: ^1.21.0
Dart SDK version: 3.0.3 (stable) (Wed May 31 15:35:05 2023 +0000) on "linux_x64"
I use Ubuntu 22.04
Hello!
found the stub.updateRecords but there seems to be no mode to update the whole object? for stuff coming e.g. from a form where i want to update all fields without checking which ones were really changed, having to spell out all the fields makes it more practical to use plain SQL directly?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.