Skip to content

/database/query.Execute() should runtime if database is not specified at least once #2442

@amylizzle

Description

@amylizzle

This should succeed:

/proc/RunTest()	
	var/database/db = new("database.db")

	var/database/query/query = new("CREATE TABLE test (id int, name string, points float)")
	query.Execute(db)

This should fail:

/proc/RunTest()	
	var/database/db = new("database.db")

	var/database/query/query = new("CREATE TABLE test (id int, name string, points float)")
	query.Execute() //note the lack of arg

After the first use of Execute() with a db, any further uses of the query without the db argument should operate on the db specified in the first query use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeInvolves the OpenDream server/runtimegood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions