如何在intellij 13预览中在本地磁盘中打开sqlite db文件 [英] How do I open a sqlite db file in my local disk in intellij 13 preview

查看:350
本文介绍了如何在intellij 13预览中在本地磁盘中打开sqlite db文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以在intellij的左侧窗格中看到db文件,但是当我双击该文件时,没有打开任何内容。此外,我正在试用终极版。

I can see the db file in the left pane of intellij but when I double click the file, nothing is opened. Also, I am on a trial of ultimate edition.

推荐答案

SQLite数据库不是一个可以通过双击。要访问数据库,需要定义数据库驱动程序以与文件一起使用。以下是配置数据库以供使用的方法:

An SQLite database is not a simple file that can be opened via a double click. To access a database, a Database driver needs to be defined to be used with the file. Here's how you can configure the database for use:


  1. 打开数据库工具窗口(默认情况下位于右侧,或查看>工具窗口>数据库

  2. 使用添加图标下拉列表选择SQLite和您要使用的驱动程序

  3. 如果这是您第一次配置SQLite数据库,则需要配置先是司机。


    • 可以全局定义驱动程序,然后由数据库定义使用;或

    • 可以根据数据库定义定义驱动程序。

    • 由于您可以定义多个全局驱动程序(例如,不同版本),因此第一个选项通常是最好的/最简单的

  1. Open the Database tool window (On the right side by default, or View> Tool Windows > Database)
  2. Use the add icon drop down to select SQLite and the driver you want to use
  3. If this is the first time you have configured an SQLite database, you will need to configure the driver first.
    • Drivers can be defined globally, and then used by a database definition; or
    • Drivers can be defined per database definition.
    • Since you can define multiple global drivers (different versions for example), the first option is generally the best/easiest

  • 如果在表格上打开上下文菜单(即右键单击或上下文菜单键),则可以打开表格编辑器,您可以在其中查看(并可以编辑)表格内容。 (数据库工具窗口的工具栏中还有一个编辑表按钮)

  • 在上下文菜单中也是打开控制台的选项。您可以输入SQL命令然后执行它们(数据库工具窗口的工具栏中还有一个控制台按钮)。在控制台或代码中编辑SQL语句时,IDEA确实为数据库提供了代码完成。

  • 请注意,如果在外部进行任何更改(尤其是结构更改),并且您没有选择auto-在配置中同步,您需要重新同步数据库以查看这些更改。数据库工具窗口中有一个同步按钮。

这篇关于如何在intellij 13预览中在本地磁盘中打开sqlite db文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆