-
Notifications
You must be signed in to change notification settings - Fork 0
/
$readme.txt
77 lines (56 loc) · 2.69 KB
/
$readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FIXME design - search for these, which designate request for external review
TODO major - designates significant unimplemented
Major friction due to Python Path
Pycharm sets it (thankyou), but cmd-line, vsc (etc) do not
Run > Configurations, unset Source & Content Roots
This should make debug runs == cmd-line, vsc
Significant bug fixes:
See nw/trans_tests/upd_order_reuse, and logic_engine/exec_row_logic/logic_row#save_altered_parents
Various misc copy/paste:
update orderdetail set amount = unitPrice * quantity
update "Order" set AmountTotal =
(select sum(orderdetail.amount) from orderdetail where orderdetail.orderid = "Order".id);
select id, customerid, shippeddate, amounttotal from "Order" where id = 11011;
select ProductName, UnitsInStock, UnitsShipped from Product where id = 58;
select id, balance, creditlimit from customer where id="ALFKI";
960
update Customer set Balance =
(select sum("Order".amounttotal) from "Order" where Customer.id = "Order".customerid
and "Order".shippeddate is null);
update Customer set UnpaidOrderCount =
(select count("Order".amounttotal) from "Order" where Customer.id = "Order".customerid
and "Order".shippeddate is null);
update Customer set Balance = 0 where balance is null;
update Customer set Balance = 960 where id="ALFKI";
update Customer set creditlimit = balance + 100;
830 orders, 21 not shipped
11045 for BOTTM (22607.7 ==> 1309.5)
ALFKI has balance=0
select id, amounttotal from "Order" where id=11011;
CREATE TABLE IF NOT EXISTS "OrderX"
(
"Id" INTEGER PRIMARY KEY AUTOINCREMENT,
"CustomerId" VARCHAR(8000) NULL,
"EmployeeId" INTEGER NOT NULL,
"OrderDate" VARCHAR(8000) NULL,
"RequiredDate" VARCHAR(8000) NULL,
"ShippedDate" VARCHAR(8000) NULL,
"ShipVia" INTEGER NULL,
"Freight" DECIMAL NOT NULL,
"ShipName" VARCHAR(8000) NULL,
"ShipAddress" VARCHAR(8000) NULL,
"ShipCity" VARCHAR(8000) NULL,
"ShipRegion" VARCHAR(8000) NULL,
"ShipPostalCode" VARCHAR(8000) NULL,
"ShipCountry" VARCHAR(8000) NULL, AmountTotal Decimal(10,2),
FOREIGN KEY (CustomerId) REFERENCES Customer(Id),
FOREIGN KEY (EmployeeId) REFERENCES Employee(Id)
);
insert into Orderx select * from "Order";
SELECT Id, CustomerId FROM "Order"
WHERE NOT EXISTS (SELECT 1 FROM Customer WHERE Customer.Id = "Order".CustomerId);
OrderList fails on 10248 : 10272 (no orphans to Customer, Employee) - serving.py @ 314
ha! Due to a null row - deleted it, runs fine now
[10248, 10249, 10250, 10251, 10252, 10253, 10254, 10255, 10256, 10257, 10258, 10259, 10260, 10261, 10262, 10263, 10264, 10265, 10266, 10267, 10268, 10269, 10270, 10271, 10272]
SELECT Id, EmployeeId FROM "Order"
WHERE NOT EXISTS (SELECT 1 FROM Employee WHERE Employee.Id = "Order".EmployeeId);