BuildState

Stores the current state of the build.

class BuildState : SQLite3 {}

Constructors

this
this(string fileName)

Open or create the build state file.

Members

Functions

add
void add(Resource resource)

Inserts a vertex into the database unless it already exists.

add
void add(Task task)
Undocumented in source. Be warned that the author may not have intended to support it.
addPending
void addPending(Index!Resource v)
void addPending(Index!Task v)

Adds a vertex to the list of pending vertices. If the vertex is already pending, nothing is done.

degreeIn
size_t degreeIn(Index!Resource index)
size_t degreeIn(Index!Task index)
degreeOut
size_t degreeOut(Index!Resource index)
size_t degreeOut(Index!Task index)

Returns the number of incoming edges to the given vertex.

edgeExists
bool edgeExists(Index!Task from, Index!Resource to, EdgeType type)
bool edgeExists(Index!Resource from, Index!Task to, EdgeType type)

Checks if an edge exists between two vertices.

find
Index!Resource find(const(char)[] key)
Index!Task find(TaskKey id)

Returns the index of the given vertex.

isPending
bool isPending(Index!Resource v)
bool isPending(Index!Task v)

Returns true if a given vertex is pending.

length
ulong length()

Returns the number of vertices in the database.

length
ulong length()

Dito

opIndex
Resource opIndex(Index!Resource index)
Task opIndex(Index!Task index)

Returns the vertex state at the given index.

opIndex
Resource opIndex(ResourceId path)
Task opIndex(TaskKey key)

Returns the vertex state for the given vertex name. Throws an exception if the vertex does not exist.

opIndexAssign
void opIndexAssign(Resource v, Index!Resource index)
void opIndexAssign(Task v, Index!Task index)

Changes the state of the vertex at the given index. Throws an exception if the vertex does not exist.

put
Index!Resource put(Resource resource)
Index!Task put(Task task)

Inserts a vertex into the database. An exception is thrown if the vertex already exists. Otherwise, the vertex's ID is returned.

put
void put(Index!Task from, Index!Resource to, EdgeType type)
void put(Index!Resource from, Index!Task to, EdgeType type)
void put(ResourceId a, TaskKey b, EdgeType type)
void put(TaskKey a, ResourceId b, EdgeType type)

Adds an edge. Throws an exception if the edge already exists. Returns the index of the edge.

remove
void remove(Index!Resource index)
void remove(Index!Task index)
void remove(ResourceId path)
void remove(TaskKey key)

Removes a vertex by the given index. If the vertex does not exist, an exception is thrown.

remove
void remove(Index!Resource from, Index!Task to, EdgeType type)
void remove(Index!Task from, Index!Resource to, EdgeType type)
void remove(TaskKey from, ResourceId to, EdgeType type)
void remove(ResourceId from, TaskKey to, EdgeType type)

Removes an edge. Throws an exception if the edge does not exist.

removePending
void removePending(Index!Resource v)
void removePending(Index!Task v)
void removePending(ResourceId v)
void removePending(TaskKey v)

Removes a pending vertex.

Properties

edges
auto edges [@property getter]
EdgeType edges [@property setter]

Lists all outgoing task edges.

edges
auto edges [@property getter]

Lists all outgoing resource edges.

enumerate
auto enumerate [@property getter]

Returns an input range that iterates over all resources. The order is guaranteed to be the same as the order they were inserted in.

enumerate
auto enumerate [@property getter]

Returns an input range that iterates over all tasks. The order is guaranteed to be the same as the order they were inserted in.

enumerate
auto enumerate [@property getter]

Returns a range of vertex keys. The returned range is not guaranteed to be sorted.

enumerate
auto enumerate [@property getter]

Returns a range of row indices.

incoming
Index!Resource incoming [@property setter]
Index!Task incoming [@property setter]
auto incoming(Index!Task v, EdgeType type)

Returns the incoming neighbors of the given node.

islands
auto islands [@property getter]

Finds vertices with no incoming and no outgoing edges.

outgoing
Index!Resource outgoing [@property setter]
Index!Task outgoing [@property setter]
auto outgoing(Index!Task v, EdgeType type)

Returns the outgoing neighbors of the given node.

pending
auto pending [@property getter]

Lists the pending vertices.

Static variables

buildDescId
auto buildDescId;
Undocumented in source.

Inherited Members

From SQLite3

~this
~this()

Closes the database.

open
void open(string file)

Opens or creates a database.

open
void open(sqlite3* db)

Takes control of an existing database handle. The database will still be closed upon destruction.

close
void close()

Closes the database.

begin
void begin()
commit
void commit()
rollback
void rollback()

Convenience functions for beginning, committing, or rolling back a transaction.

handle
sqlite3* handle [@property getter]

Returns the internal handle to the SQLite3 database. This should only be used if this class does not provide the necessary functionality.

prepare
Statement prepare(string sql, T args)

Prepare SQL statement for multiple execution or for parameters binding.

execute
uint execute(string sql, T args)

Like prepare, but ignores results and returns the number of changed rows.

lastInsertId
ulong lastInsertId [@property getter]

Returns the ID of the last row that was inserted.

changes
uint changes [@property getter]

Returns the number of rows changed by the last statement.

Statement
class Statement

The database is accessed using statements.

Meta