Skip to content

Commit

Permalink
More proofreading
Browse files Browse the repository at this point in the history
  • Loading branch information
smolinari committed Jan 6, 2016
1 parent 9a74e67 commit fcfd834
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 83 deletions.
2 changes: 1 addition & 1 deletion Administration.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- proofread 2015-01-05 SAM -->
<!-- proofread 2015-01-06 SAM -->

### Administration
_____
Expand Down
107 changes: 55 additions & 52 deletions Console-Command-Begin.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,55 @@
# Console - `BEGIN`

Initiates a transaction. When a transaction is open, any commands you execute on the database remain temporary. In the event that you are satisfied with the changes, you can call the [`COMMIT`](Console-Command-Commit.md) command to commit them to the database. Otherwise, you can call the [`ROLLBACK`](Console-Command-Rollback.md) command, to roll the changes back to the point where you called [`BEGIN`](Console-Command-Begin.md).

**Syntax:**

```sql
BEGIN
```

**Examples**

- Begin a transaction:

<pre>
orientdb> <code class="lang-sql userinput">BEGIN</code>

Transaction 1 is running
</pre>

- Attempting to begin a transaction when one is already open:

<pre>
orinetdb> <code class='lang-sql userinput'>BEGIN</code>

Error: an active transaction is currently open (id=1). Commit or rollback
before starting a new one.
</pre>

- Making changes when a transaction is open:

<pre>
orientdb> <code class="lang-sql userinput">INSERT INTO Account (name) VALUES ('tx test')</code
Inserted record 'Account#9:-2{name:tx test} v0' in 0,004000 sec(s).
orientdb> <code class="lang-sql userinput">SELECT FROM Account WHERE name LIKE 'tx%'</code>

---+-------+----------
# | RID | name
---+-------+----------
0 | #9:-2 | tx test
---+-------+----------
</pre>

When a transaction is open, new records all have temporary Record ID's, which are given negative values, (for instance, `#9:-2` above). These remain in effect until you run [`COMMIT`](Console-Command-Commit.md)

>For more information on Transactions, see
>- [Transactions](Transactions.md)
>- [Console Command COMMIT](Console-Command-Commit.md)
>- [Console Command ROLLBACK](Console-Command-Rollback.md)
>- [Console Commands](Console-Commands.md)
<!-- proofread 2015-01-06 SAM -->

# Console - `BEGIN`

Initiates a transaction. When a transaction is open, any commands you execute on the database remain temporary. In the event that you are satisfied with the changes, you can call the [`COMMIT`](Console-Command-Commit.md) command to commit them to the database. Otherwise, you can call the [`ROLLBACK`](Console-Command-Rollback.md) command, to roll the changes back to the point where you called [`BEGIN`](Console-Command-Begin.md).

**Syntax:**

```sql
BEGIN
```

**Examples**

- Begin a transaction:

<pre>
orientdb> <code class="lang-sql userinput">BEGIN</code>

Transaction 1 is running
</pre>

- Attempting to begin a transaction when one is already open:

<pre>
orinetdb> <code class='lang-sql userinput'>BEGIN</code>

Error: an active transaction is currently open (id=1). Commit or rollback
before starting a new one.
</pre>

- Making changes when a transaction is open:

<pre>
orientdb> <code class="lang-sql userinput">INSERT INTO Account (name) VALUES ('tx test')</code
Inserted record 'Account#9:-2{name:tx test} v0' in 0,004000 sec(s).
orientdb> <code class="lang-sql userinput">SELECT FROM Account WHERE name LIKE 'tx%'</code>

---+-------+----------
# | RID | name
---+-------+----------
0 | #9:-2 | tx test
---+-------+----------
</pre>

When a transaction is open, new records all have temporary Record ID's, which are given negative values, (for instance, like the `#9:-2` shown above). These remain in effect until you run [`COMMIT`](Console-Command-Commit.md)

For more information on Transactions, see

- [Transactions](Transactions.md)
- [Console Command COMMIT](Console-Command-Commit.md)
- [Console Command ROLLBACK](Console-Command-Rollback.md)
- [Console Commands](Console-Commands.md)
64 changes: 34 additions & 30 deletions Console-Command-Browse-Class.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
# Console - `BROWSE CLASS`

Displays all records associated with the given class.

**Syntax:**

```
BROWSE CLASS <class-name>
```

- **`<class-name>`** Defines the class for the records you want to display.

**Example:**

- Browse records associated with the class `City`:

<pre>
orientdb> <code class="lang-sql userinput">BROWSE CLASS City</code>

----+------+-------------------
# | RID | NAME
----+------+-------------------
0 | -6:0 | Rome
1 | -6:1 | London
2 | -6:2 | Honolulu
----+------+-------------------
</pre>

>For more information on other commands, see [Console Commands](Console-Commands.md).
<!-- proofread 2015-01-06 SAM -->

# Console - `BROWSE CLASS`

Displays all records associated with the given class.

**Syntax:**

```
BROWSE CLASS <class-name>
```

- **`<class-name>`** Defines the class for the records you want to display.

**Example:**

- Browse records associated with the class `City`:

<pre>
orientdb> <code class="lang-sql userinput">BROWSE CLASS City</code>

----+------+-------------------
# | RID | NAME
----+------+-------------------
0 | -6:0 | Rome
1 | -6:1 | London
2 | -6:2 | Honolulu
----+------+-------------------
</pre>

For more information on other commands, see

- [Console Commands](Console-Commands.md).

0 comments on commit fcfd834

Please sign in to comment.