SQLite[edit]

Install[edit]

zcat sqlite-3.6.21.tar.gz |tar xfv -
mkdir sqlite_build
cd sqlite_build
../sqlite-3.6.21/configure
make
make install

操作[edit]

example[edit]
sqlite3 /var/lib/jupyterhub/jupyterhub.sqlite
sqlite> .tables

alembic_version   oauth_clients     service_role_map  spawners
api_tokens        oauth_codes       services          user_group_map
group_role_map    roles             share_codes       user_role_map
groups            servers           shares            users

sqlite> .schema users

CREATE TABLE users (
       id INTEGER NOT NULL,
       name VARCHAR(255),
       admin BOOLEAN,
       created DATETIME,
       last_activity DATETIME,
       cookie_id VARCHAR(255) NOT NULL,
       state TEXT,
       encrypted_auth_state BLOB,
       CONSTRAINT pk_users PRIMARY KEY (id),
       CONSTRAINT uq_users_name UNIQUE (name),
       CONSTRAINT uq_users_cookie_id UNIQUE (cookie_id)
);

sqlite> .mode line
sqlite> select * from users;
.....
.....
.....

sqlite> select * from  spawners;

            id = 1
       user_id = 2
     server_id = 1
         state = {"object_id": "8ba99eacf5221c9e2336f2d63036ceffe16735a359e4f381a64771caf6ab69d6", "object_name": "jupyterhub-182-114-el.mml.tuis.ac.jp-8qfypVfb-iseki"}
          name =
       started = 2024-12-13 07:45:44.824935
 last_activity = 2024-12-13 16:45:50.000000
  user_options =
oauth_client_id = jupyterhub-user-iseki

Troubleshooting[edit]


トップ   新規 ページ一覧 検索 最終更新   ヘルプ   最終更新のRSS