mirror of
				https://github.com/chaisql/chai.git
				synced 2025-10-31 10:56:22 +08:00 
			
		
		
		
	Improve default value expressions
This commit is contained in:
		| @@ -5,6 +5,7 @@ import ( | ||||
|  | ||||
| 	"github.com/genjidb/genji/document" | ||||
| 	"github.com/genjidb/genji/internal/database" | ||||
| 	"github.com/genjidb/genji/internal/expr" | ||||
| 	"github.com/genjidb/genji/internal/query/statement" | ||||
| 	"github.com/genjidb/genji/internal/sql/parser" | ||||
| 	"github.com/genjidb/genji/internal/testutil" | ||||
| @@ -66,7 +67,7 @@ func TestParserAlterTableAddField(t *testing.T) { | ||||
| 				Path:         document.Path(testutil.ParsePath(t, "bar")), | ||||
| 				Type:         document.IntegerValue, | ||||
| 				IsNotNull:    true, | ||||
| 				DefaultValue: document.NewIntegerValue(0), | ||||
| 				DefaultValue: expr.Constraint(expr.LiteralValue(document.NewIntegerValue(0))), | ||||
| 			}, | ||||
| 		}, false}, | ||||
| 		{"With error / missing FIELD keyword", "ALTER TABLE foo ADD bar", nil, true}, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Asdine El Hrychy
					Asdine El Hrychy