[chore] Update bun / sqlite versions; update gtsmodels (#754)

* upstep bun and sqlite versions

* allow specific columns to be updated in the db

* only update necessary columns for user

* bit tidier

* only update necessary fields of media_attachment

* only update relevant instance fields

* update tests

* update only specific account columns

* use bool pointers on gtsmodels
includes attachment, status, account, user

* update columns more selectively

* test all default fields on new account insert

* updating remaining bools on gtsmodels

* initialize pointer fields when extracting AP emoji

* copy bools properly

* add copyBoolPtr convenience function + test it

* initialize false bool ptrs a bit more neatly
This commit is contained in:
tobi 2022-08-15 12:35:05 +02:00 committed by GitHub
commit ac6ed3d939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
376 changed files with 337942 additions and 298092 deletions

53
vendor/modernc.org/ccgo/v3/lib/go.go generated vendored
View file

@ -9523,7 +9523,7 @@ func (p *project) postfixExpressionSelectPSelectStruct(f *function, n *cc.Postfi
func (p *project) postfixExpressionSelectSelect(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
// PostfixExpression '.' IDENTIFIER
switch k := p.opKind(f, n.PostfixExpression, n.PostfixExpression.Operand.Type()); k {
switch k := p.structOrUnion(n); k {
case opUnion:
p.postfixExpressionSelectSelectUnion(f, n, t, mode, flags)
case opStruct:
@ -9533,6 +9533,40 @@ func (p *project) postfixExpressionSelectSelect(f *function, n *cc.PostfixExpres
}
}
func (p *project) structOrUnion(n *cc.PostfixExpression) opKind {
t := n.PostfixExpression.Operand.Type()
switch n.Case {
case cc.PostfixExpressionSelect: // PostfixExpression '.' IDENTIFIER
// ok
case cc.PostfixExpressionPSelect: // PostfixExpression "->" IDENTIFIER
if t.Kind() == cc.Ptr {
t = t.Elem()
break
}
p.err(n, "expected pointer type: %s", t)
return opStruct
}
f, path, ok := t.FieldByName2(n.Token2.Src)
if !ok {
p.err(&n.Token, "unknown field: %s", n.Token2)
return opStruct
}
for len(path) > 1 {
f = t.FieldByIndex(path[:1])
path = path[1:]
t = f.Type()
}
if t.Kind() == cc.Union {
// trc("%v: %q %v", n.Token2.Position(), n.Token2.Src, opUnion)
return opUnion
}
// trc("%v: %q %v", n.Token2.Position(), n.Token2.Src, opStruct)
return opStruct
}
func (p *project) postfixExpressionSelectSelectStruct(f *function, n *cc.PostfixExpression, t cc.Type, mode exprMode, flags flags) {
// PostfixExpression '.' IDENTIFIER
fld := n.Field
@ -12640,6 +12674,23 @@ func (p *project) iterationStatement(f *function, n *cc.IterationStatement) {
}
p.statement(f, n.Statement, true, false, false, 0)
case cc.IterationStatementForDecl: // "for" '(' Declaration Expression ';' Expression ')' Statement
if !(f.hasJumps || n.Expression2 != nil && n.Expression2.Case == cc.ExpressionComma) {
p.w("{")
p.declaration(f, n.Declaration, false)
p.w("for ;")
if n.Expression != nil {
p.expression(f, n.Expression, n.Expression.Operand.Type(), exprBool, 0)
}
p.w(";")
if n.Expression2 != nil {
p.expression(f, n.Expression2, n.Expression2.Operand.Type(), exprVoid, fNoCondAssignment)
}
p.w("{")
p.statement(f, n.Statement, false, true, false, 0)
p.w("}};")
break
}
var ids []*cc.InitDeclarator
for list := n.Declaration.InitDeclaratorList; list != nil; list = list.InitDeclaratorList {
ids = append(ids, list.InitDeclarator)