Skip to content

Commit

Permalink
updated doc structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ea-rus committed Sep 14, 2023
1 parent 628a7c7 commit a77c58b
Show file tree
Hide file tree
Showing 11 changed files with 56 additions and 15 deletions.
4 changes: 2 additions & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
requests
pandas == 1.3.5
mindsdb-sql >= 0.5.0, < 0.6.0
pandas >=2.0.0, <2.1.0
mindsdb-sql >= 0.7.0, < 0.8.0

sphinx
sphinx-rtd-theme
4 changes: 2 additions & 2 deletions docs/source/database.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Database
Databases
----------------------------

.. automodule:: mindsdb_sdk.database
.. automodule:: mindsdb_sdk.databases
:members:
:undoc-members:
:show-inheritance:
5 changes: 5 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,14 @@ API documentation

server
database
ml_engines
project
model
tables
views
query
jobs


Indices and tables
------------------
Expand Down
7 changes: 7 additions & 0 deletions docs/source/jobs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Jobs
-------------------------

.. automodule:: mindsdb_sdk.jobs
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/ml_engines.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ML Engines
-------------------------

.. automodule:: mindsdb_sdk.ml_engines
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/source/model.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Model
Models
-------------------------

.. automodule:: mindsdb_sdk.model
.. automodule:: mindsdb_sdk.models
:members:
:undoc-members:
:show-inheritance:
4 changes: 2 additions & 2 deletions docs/source/project.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Project
Projects
---------------------------

.. automodule:: mindsdb_sdk.project
.. automodule:: mindsdb_sdk.projects
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/tables.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Tables
-------------------------

.. automodule:: mindsdb_sdk.tables
:members:
:undoc-members:
:show-inheritance:
7 changes: 7 additions & 0 deletions docs/source/views.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Views
-------------------------

.. automodule:: mindsdb_sdk.views
:members:
:undoc-members:
:show-inheritance:
9 changes: 8 additions & 1 deletion mindsdb_sdk/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@ class Project:
"""
Allows to work with project: to manage models and views inside of it or call raw queries inside of project
**Queries**
Server instance allows to manipulate project and databases (integration) on mindsdb server
Attributes for accessing to different objects:
- models
- views
- jobs
It is possible to cal queries from project context:
Making prediciton using sql:
Expand Down
13 changes: 7 additions & 6 deletions mindsdb_sdk/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,18 +122,19 @@ def update(self, values: Union[dict, Query], on: list = None, filters: dict = No
'''
Update table by condition of from other table.
If 'values' is a dict:
- it will be an update by condition
- 'filters' is required
- used command: update table set a=1 where x=1
- it will be an update by condition
- 'filters' is required
- used command: update table set a=1 where x=1
If 'values' is a Query:
- it will be an update from select
- 'on' is required
- used command: update table on a,b from (query)
- it will be an update from select
- 'on' is required
- used command: update table on a,b from (query)
:param values: input for update, can be dict or query
:param on: list of column to map subselect to table ['a', 'b', ...]
:param filters: dict to filter updated rows, {'column': 'value', ...}
'''

if isinstance(values, Query):
Expand Down

0 comments on commit a77c58b

Please sign in to comment.