Commit graph

157 commits

Author SHA1 Message Date
Felipe Pena
1e86e06eb6
orm: fix subquery without where expr (#21598) 2024-06-04 13:22:06 +03:00
Turiiya
5e01f673de
vlib, cmd: fix typo unkown -> unknown (#21535) 2024-05-20 08:28:46 +03:00
Turiiya
7f7d7a1bb0
builder, ci: fix compilation on macos-arm with -cstrict; run macos ci also on the arm runner (#21408) 2024-05-03 17:49:22 +03:00
Delyan Angelov
fe9be9632d
ci: fix the ubuntu-docker-musl job by skipping veb_app_test.v 2024-04-25 06:36:14 +03:00
Turiiya
8dafca126f
test, ci: fix network tests; update and activate tests in periodic ci (#21339) 2024-04-25 02:15:22 +03:00
Turiiya
1595211fbe
tools: rewrite test-self arg handling (#21327) 2024-04-23 14:12:45 +03:00
Turiiya
3b0c6206bb
tools: allow for selectively running v test-self vlib/ and v test-self cmd/ (#21326) 2024-04-22 20:13:29 +03:00
Turiiya
a6087d01a2
vdoc: cleanup get_module_list, add unit tests (#21057) 2024-04-18 21:47:51 +03:00
Turiiya
183c199021
vdoc: improve creation of trimmed node descriptions, extend tests (#21281) 2024-04-15 14:54:06 +03:00
Turiiya
3ce587085a
tests: enable again http_httpbin_test.v, since net.http now uses mbedtls (#21279) 2024-04-14 23:25:52 +03:00
Turiiya
39600564a9
tools: add check for unavailable files in vtest (#21272) 2024-04-14 07:52:42 +03:00
Turiiya
96751ede14
tools: revise vtest-self.v: remove dead paths, fix json2 essential test path (#21267) 2024-04-13 09:06:04 +03:00
Turiiya
739730b9d8
vdoc: fix sorting of docnodes on other than linux, enable tests (#21253) 2024-04-12 10:35:01 +03:00
David Legrand
0a2346a2eb
vtest-self: add native_test to skippable tests for sandboxed packaging (#21095) 2024-03-25 13:11:01 +02:00
David Legrand
36f1750de7
vtest-self: add sandboxed packaging case (#21059) 2024-03-19 11:36:03 +02:00
Turiiya
164a738744
ci,tests: enable vdoc tests on linux; fix unintended line break (#21014) 2024-03-14 10:16:50 +02:00
Delyan Angelov
f43b52860d
tools: use the same same skipping logic for the platform specific _test.v files in v test-self too (#20815) 2024-02-13 18:36:51 +02:00
syrmel
6a4f2937ef
vtest,pref: add ability to have platform specific _test.v files (#20810) 2024-02-13 12:06:47 +02:00
Delyan Angelov
5269c02faf
ast: make Scope.find methods more robust, when called on default initialised scope &Scope = unsafe { nil } fields (#20774) 2024-02-10 19:53:10 +02:00
Casper Küthe
3bd99309dd
x.vweb: add new sessions module (#20642) 2024-02-07 19:00:48 +02:00
Casper Küthe
d88ca11a4c
picoev, x.vweb: small fixes and backport changes from vweb (#20584) 2024-01-23 18:34:22 +02:00
gym603
bc37c85cae
tests: make 'test-self' pass under msys2/MINGW32 (#20614) 2024-01-22 01:20:53 +02:00
gym603
9f95ab7c5e
tests: make v test-self run _test.c.v files too (#20612) 2024-01-21 21:11:23 +02:00
Delyan Angelov
6107e0d154
tests: show compile time and runtime for each _test.v file in separate columns (#20520) 2024-01-20 17:38:46 +02:00
Felipe Pena
1303c244e2
orm.pg: fix f32 and f64 endianness (#20412) 2024-01-06 22:27:10 +02:00
Anton
18954afa73
cgen: escape table names (fix #20313) (#20322) 2024-01-01 15:23:25 +02:00
jacksonmowry
06a536eff2
db.pg: fix invalid memory access in res_to_rows (#20248) 2023-12-22 02:02:31 +02:00
jacksonmowry
d86a11c257
db.mysql: add ability to prepare and execute statements separately (#20146) 2023-12-11 13:34:20 +02:00
Casper Küthe
08189d649c
vweb2 (#19997) 2023-12-09 08:07:51 +03:00
Felipe Pena
dfab24b936
orm: fix code generated for fields of ?[]Type (#20032) 2023-11-30 23:36:50 +02:00
Delyan Angelov
0c4abf0c19
ci: skip the cmd/tools/vpm/ tests on the fsanitize_memory jobs, because of the handshake code in net.mbedtls, which uses assembly, that is known to sporadically fail the sanitizer 2023-11-30 23:16:49 +02:00
Felipe Pena
00b1ce5760
orm: fix code generation for an option time.Time field (#20031) 2023-11-29 19:30:34 +02:00
gym603
46086c046f
tests: make 'v test-self' pass under msys2/MINGW64 (#20010) 2023-11-28 15:03:30 +02:00
Alexander Medvednikov
f09826e928 all: unwrap const() blocks 2023-11-25 10:02:51 +03:00
JalonSolov
0da00cc457
v: prepare for making -W impure-v the default (#19940) 2023-11-20 09:17:59 +02:00
Delyan Angelov
c8382264a4
ci,tools: remove skips for the wasm backend, since binaryen is not required anymore (#19883) 2023-11-15 20:30:14 +02:00
JalonSolov
c494b63d75
os,picohttpparser,sokol,strconv: prepare for making -W impure-v the default (#19846) 2023-11-12 09:52:14 +02:00
Casper Küthe
c0eeb85eab
net.unix: update the module to make it compatible with windows and coroutines (#19831) 2023-11-11 10:07:56 +02:00
JalonSolov
01022e918e
flag,json,net: handle C calls in .v files (part of enabling -W impure-v as default) (#19779) 2023-11-06 14:27:00 +02:00
JalonSolov
f1ba664e92
builtin: move builtin_test.v to builtin_test.c.v (part of making -W impure-V the default) (#19757) 2023-11-04 10:14:50 +02:00
Turiiya
3e50ba0856
ci: update and cleanup the ci related code (#19541) 2023-10-10 21:39:00 +03:00
Tim Marston
756075380b
orm: add null handling and option fields (#19379)
* orm: added is none and !is none handling

* orm: added NullType, support option fields and deprecate [nonull]

Nullable DB fields are now determined by corresponding option struct field.  The
[nonull] attribute is deprecated and fields are all NOT NULL now, unless they
are option fields. New orm primitive, NullType, added to support passing none
values to db backends, which have been updated to support it.  Also, empty
string and 0 numberic values are no longer skipped during insert (since they may
be valid values).

* orm: fix [nonull] deprecation warning

* orm: add null handling to update and select

also, improved formatting for orm cgen, and removed optimised operand handling
of orm `is` and `!is` operators

* sqlite: read/report NULLs using new orm NullType

* postgres: returning data primitives now returns new orm.NullType

* orm: initialise NullType Primitives properly

* orm: do not smart cast operands inside sql

* orm: fix bad setting of option value

* orm: improve orm_null_test.v, adding/fixing selects

* orm: cleanup: rename NullType->Null, use serial const, cgen output

* orm: handle automatically generated fields more explicitly

During insert, fields which are
* [sql: serial]
* [default: whatever]
and where the data is a default value (e.g., 0, ""), those fields are not sent
to the db, so that the db can generate auto-increment or default values.  (This
was previously done only for [primary] fields, and not in all circumstances, but
that is not correct -- primary and serial/auto-increment fields are differnet.)

* orm: udpated README

* orm: select cgen fixes: read from uninit res; fail to init res

* orm: udpated tests

* orm: fix option sub-struct fields

* orm: fixed joins to option structs

Changed orm.write_orm_select() so that you pass to it the name of a resut
variable which it populates with the result (or not) and changed use of it in
sql_select_expr() and calls in write_orm_select() to populate substructs.

* orm: fix pg driver handling of NULL results

* orm: move runtime checks to comptime checker; cache checked tables

* orm: vfmt :(

* orm: markdown formatting

* orm: renamed orm.time_ and orm.enum_; updated db drivers

* checker: updated orm tests

* orm: fix issue setting up ast option values as orm primitives

* checker: ORM use of none/options and operations (added tests)

* orm: fixed tests

* db: clean code

* examples: remove orm nonull attributes

* orm: skip test memory santisation for orm_null_test.v

* orm: make the type-to-primitive converstion fns not public

* orm: mv object var c-code from checker->cgen; fix memory corruption

Code in checker/orm.v used the SqlStmtLine object field name to store c-specific
referenecs to option and array fields (for arrays of children).  I moved this
logic to cgen.  And fixed an issue introduced with option fields, where an array
of children was unpacked into a non-array result which could corrupt memory.

* orm: fixed vast error

* orm: skip 2 tests on ubuntu-musl which require sqlite3.h

* cgen: prevent casting a struct (string)

* v fmt orm_fkey_attribute.vv, orm_multidim_array.vv, orm_table_attributes.vv; run `VAUTOFIX=1 ./v vlib/v/compiler_errors_test.v`
2023-10-05 19:09:03 +03:00
yuyi
74997fd824
ast, cgen: fix as cast with call expr (fix #19453) (#19462) 2023-09-29 11:59:14 +03:00
Casper Küthe
74d80a5120
orm: add support for V enum struct fields (#19374) 2023-09-18 16:06:26 +03:00
asvln
2cce907dcb
orm: add references attribute to allow foreign key declarations on fields (#19349) 2023-09-16 12:04:32 +03:00
Casper Küthe
e8d133d548
orm: fix cgen inserting wrong array index (#19324) 2023-09-12 14:50:13 +03:00
yuyi
18e60e77de
fmt: remove inline comments (#19263) 2023-09-03 23:51:56 +03:00
Delyan Angelov
58b6ba81d1
builtin: implement array.sorted() and array.sorted_with_compare() methods, that do not modify their receivers (#19251) 2023-09-01 09:12:00 +03:00
jacksonmowry
d285ff08f0
db.mysql: add the exec family of methods (#19132) 2023-08-14 16:18:01 +03:00
Etienne Girondel
492e918fdb
builder,pref: allow thirdparty objects compilation with CPP compiler (#19124) 2023-08-13 20:30:28 +03:00