Skip to content

Commit 9161f8a

Browse files
Update lang-specific docs.
1 parent fad8f70 commit 9161f8a

File tree

5 files changed

+36
-5
lines changed

5 files changed

+36
-5
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11

22
.. code-block:: python
33
4-
# update value in record with id=1
4+
# with record as a dict specifying the primary and
5+
# secondary attribute values
6+
table.update1(record)
7+
8+
# update value in record with id as primary key
59
table.update1({'id': 1, 'value': 3})
610
7-
# reset value to default
11+
# reset value to default with id as primary key
812
table.update1({'id': 1, 'value': None})
13+
## OR
14+
table.update1({'id': 1})
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
.. code-block:: python
3+
4+
# set the query cache path
5+
dj.config['query_cache'] = os.path.expanduser('~/dj_query_cache')
6+
7+
# access the currently active connection object
8+
conn = dj.conn()
9+
## OR
10+
conn = schema.connection
11+
## OR
12+
conn = table.connection
13+
14+
# activate query caching for a namespace called 'main'
15+
conn.set_query_cache(query_cache='main')
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
.. code-block:: python
3+
4+
# deactivate query caching
5+
conn.set_query_cache(query_cache=None)
6+
## OR
7+
conn.set_query_cache()
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
.. code-block:: python
3+
4+
# deactivate query caching
5+
conn.purge_query_cache(query_cache='main')
6+

dev_guide/transpiler_specs.md renamed to docs-parts/queries/13-Transpiler-Design_lang1.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Design specifications of the DataJoint-to-SQL Transpiler
2-
This document contains information and reasoning that went into the design of the DataJoint-to-SQL transpiler for DataJoint for Python version 0.13.
3-
41
MySQL appears to differ from standard SQL by the sequence of evaluating the clauses of the SELECT statement.
52

63
```

0 commit comments

Comments
 (0)