1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

33 Commits

Author SHA1 Message Date
Delyan Angelov
aa61fcb3dc
orm: fix inserting sequential values (id=0), in tables with an i64 primary field (#18791) 2023-07-05 23:25:22 +03:00
Mark aka walkingdevel
6ac09e605e
orm: allow structs without the id field, more flexible primary keys (#18140) 2023-05-09 00:21:42 +03:00
Alexander Medvednikov
9f118ba3f1 orm: skip via the "-" attribute 2023-05-02 17:00:54 +02:00
Mark aka walkingdevel
3fb32a866c
all: like operator/keyword for V ORM (#18020) 2023-04-23 03:40:54 +03:00
Delyan Angelov
db97630117
examples, orm: fix orm example; add -d trace_orm option to see all ORM generated queries (#17770)
* orm: add tracing of the generated queries by the orm module, when a program is compiled with `-d trace_orm`

* examples: fix examples/database/orm.v, add comments, and ensure that the example can be run several times with no errors

The example demonstrates connecting to all 3 DBs in the same program, and will be added to the CI very soon,
to serve both as a regression test, if it fails, and as an example to how to use the ORM in combination with
raw SQL queries to the DBs (which are driver/wrapper specific, unlike the ORM, but can be more convenient in some situations).
2023-03-25 21:46:17 +02:00
walking devel
580dbc3f0e
orm: allow inserting empty objects with db.sqlite (SQLite uses a slightly different SQL dialect) (#17334) 2023-02-16 11:34:16 +02:00
walking devel
4747e70d9d
orm: make last_id() return int, instead of orm.Primitive (fix #12110) (#17151) 2023-01-29 16:00:23 +02:00
Felipe Pena
1ba1f99b9c
orm: declare missing functions to handle literal types (#16627) 2022-12-09 20:34:34 +02:00
Delyan Angelov
458e68e196
orm,sqlite,mysql,pg: cleanup import v.ast, using typeof[Type]() 2022-12-07 13:40:46 +02:00
Swastik Baranwal
ada8643ac5
checker: disallow using builtin type names for const names (#16599) 2022-12-06 15:44:25 +02:00
yuyi
017ace6ea7
vfmt: change all '$expr' to '${expr}' (#16428) 2022-11-15 16:53:13 +03:00
yuyi
992b502198
db, json, time, term: change optional to result (#16201) 2022-10-26 11:26:28 +03:00
Louis Schmieder
f249feb9da
orm: support parenthesized expressions as in select from User where (name == 'Sam' && is_customer == true) || id == 1 (#15693) 2022-09-09 21:08:48 +03:00
Hitalo Souza
95a328be98
orm: improve the README and the tests. Add an error message for foreign key tags (#15670) 2022-09-06 13:12:37 +03:00
Hitalo de Jesus do Rosário Souza
e5e750d533
orm: default attribute (#15221) 2022-07-27 00:59:32 +03:00
Hitalo de Jesus do Rosário Souza
3f3742122f
orm: sql type in struct by attribute (#14919) 2022-07-13 18:03:30 +03:00
zakuro
a46bcf3571
all: v.ast.byte_type -> v.ast.u8_type (#14964) 2022-07-06 13:32:30 +03:00
Louis Schmieder
5df3d8ac75
orm: mysql fixes (#14772) 2022-06-16 20:19:49 +03:00
Louis Schmieder
a83ac948a0
orm: document & fix pg (#14533) 2022-05-26 22:53:09 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Alexander Medvednikov
af73e195da net: byte fixes 2022-04-15 15:55:39 +03:00
Alexander Medvednikov
36ec47cd20 all: replace "NB:" with "Note:" (docs/comments) 2022-03-06 20:01:22 +03:00
Delyan Angelov
fa2de89db9
orm: do not order by default, ordering is slow; also fix a bug for tables without defined primary keys 2021-12-23 16:43:22 +02:00
Yeuda By
8d5931c96c
orm: fix a typo (#12131) 2021-10-10 03:47:35 +03:00
Alexander Medvednikov
4a6d161c08 orm: postgres fixes 2021-09-30 20:00:27 +03:00
Enzo
c8471528ce
fmt: format long sum-types with a line for each type (#11461) 2021-09-10 20:56:55 +03:00
Enzo
cc8ee5fb84
all: introduce isize and usize (#11437) 2021-09-08 05:53:39 +03:00
Louis Schmieder
0d30667ab5
orm: fix orm unique lists (#11198) 2021-08-16 14:59:23 +03:00
Shobi
012b3f0f64
orm: refactor insert part of orm_stmt_gen (#11121) 2021-08-10 23:31:09 +03:00
Louis Schmieder
a4358a6801
orm: fix unique fields (#11045) 2021-08-06 06:21:59 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
Louis Schmieder
a55ba08fad
orm: fix time (#11026) 2021-08-03 05:17:00 +03:00
Louis Schmieder
26db3b0995
orm: redesign orm (re-write it in V) (#10353) 2021-07-23 12:33:55 +03:00