Comments (4)
What are you using to connect to ActorDB?
from actordb.
actordb_console -u root
actordb> s
****************************************************************************************************************************************************************
sql type |
----------------------------------------------------------------------------------------------------------------------------------------------------------------
$CREATE TABLE tab (id INTEGER PRIMARY KEY, txt TEXT); type1 |
$CREATE TABLE tab1 (id INTEGER PRIMARY KEY, txt TEXT); type1 |
$ALTER TABLE tab ADD i INTEGER; type1 |
$CREATE TABLE tabx (id INTEGER PRIMARY KEY CHECK (typeof(id) == 'integer'), txt TEXT CHECK (typeof(id) == 'text')); type1 |
$CREATE TABLE asdf (id INTEGER PRIMARY KEY AUTOINCREMENT, txt BLOB); type2 |
$CREATE TABLE actors (id TEXT PRIMARY KEY, hash INTEGER, val INTEGER) WITHOUT ROWID; counters |
$CREATE TABLE actors (id TEXT PRIMARY KEY, hash INTEGER, size INTEGER) WITHOUT ROWID; filesystem |
$CREATE TABLE users (id INTEGER PRIMARY KEY AUTOINCREMENT, fileid TEXT, uid INTEGER, FOREIGN KEY (fileid) REFERENCES actors(id) ON DELETE CASCADE); filesystem |
----------------------------------------------------------------------------------------------------------------------------------------------------------------
PS
i've got this work:
actordb> actor type1(test) create;
actordb (1)> SELECT name FROM sqlite_master WHERE type='table';
actordb (2)> c
****************
name |
----------------
__transactions |
__adb |
tab |
tab1 |
tabx |
----------------
And this:
actordb> actor type1(test) create;
actordb (1)> PRAGMA table_info([tab]);
actordb (2)> c
****************************************
cid dflt_value name notnull pk type |
----------------------------------------
0 null id 0 1 INTEGER |
1 null txt 0 0 TEXT |
2 null i 0 0 INTEGER |
----------------------------------------
from actordb.
The thrift interface has functions: actor_types, actor_tables, actor_columns
For the SQL interface, the correct query is:
actor filesystem(1);
SELECT name FROM sqlite_master WHERE type='table';
setting * for actor name means running query across all shards (multi actor query). Setting it to 1 (or any simple word) will mean sending query to a single shard.
Multi actor queries require {{RESULT}} variable. Running this:
actor filesystem(*);
{{RESULT}}SELECT name FROM sqlite_master WHERE type='table';
Will return a much bigger result and have an additional column "actor".
from actordb.
Thank you.
from actordb.
Related Issues (20)
- Unable to open req pipe MacOS 10.13.6 HOT 2
- Error: {error,{error,<<"unknown_actor_type: type1">>}} HOT 3
- How to execute actorDB's load test? HOT 1
- SQLight drop in replacement build for C/C++ HOT 1
- LMDB still grows after delete then insert HOT 3
- actordb crash: exception exit: badmatch, sqlite_error, "SQL logic error or missing database" HOT 1
- Timeout error when executing init.example.sql on OSX HOT 2
- Connecting using MySQL CLI on OS X fails with error HOT 5
- PRAGMA LIST not updating after PRAGMA COPY HOT 1
- How to send multiple parameterised queries through the thrift interface? HOT 9
- Using mysql driver HOT 2
- Execute query timeout by using actordb_console
- Same name columns in query result are swallowed and column order can't be specified HOT 1
- Queuing of queries (basic question) HOT 3
- sqlcipher HOT 1
- Sqlite upgarde
- Running protractor test using docker-compose but getting error HOT 3
- Are clusters immutable?
- vm.args needs to have a -name parameter. -sname is not supported.
- Storage for FastAPI service
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from actordb.