On Thursday, 24 December 2020 at 23:14:16 UTC, Mathias LANG wrote:
On Thursday, 24 December 2020 at 21:59:31 UTC, Paolo Invernizzi
wrote:
My point is that the result without -de is
[...]
Which unfortunately is pretty useless in my case ...
Could you point me towards the code that triggers this ?
Mathias, reduced test case below (dustmined), thank you!
---
/Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/dmd -c -o-
-J/Users/pinver/Lembas -vcolumns -color=on -Isrc -debug -unittest
/Users/pinver/Tmp/dustmite/testing.reduced/src/fieldmanager.d ||
true <
/Users/pinver/dlang/dmd-2.095.0-beta.1/osx/bin/../../src/phobos/std/traits.d(3727,61):
Deprecation: function std.typecons.Nullable!long.Nullable.get_ is deprecated -
Implicit conversion with alias Nullable.get this will be removed after 2.096.
Please use .get explicitly.
---
import std.typecons : Nullable;
import std.array : array;
struct DBRow(Specs...)
{
alias Specs[] T;
T base;
}
class PGConnection
{
PGResultSet!Specs executeQuery(Specs)(string )
{
scope cmd = new PGCommand(this);
return cmd.executeQuery!Specs;
}
auto pgCommand(string ) {
return new PGCommand(this);
}
}
class PGCommand
{
PGConnection conn;
string preparedName;
this(PGConnection ){
}
PGResultSet!Specs executeQuery(Specs)()
{
return conn.executeQuery!Specs(preparedName);
}
}
class PGResultSet(Specs)
{
alias DBRow!Specs Row;
bool empty = true;
void popFront()
{
}
Row front()
{ return Row.init;
}
}
void importPanoptesFixations(short legId, DbModel dbModel)
{
queryAsArray(dbModel.conn, legId);
}
struct DbModel
{
PGConnection conn;
}
struct Foo {
Nullable!long sessionStartedAtMs;
}
auto queryAsArray(Conn)(Conn conn, short ) {
auto comm = conn.pgCommand(`select * from foo`);
auto rset = comm.executeQuery!Foo;
rset.array;
}
---