github.com/kotovmak/go-admin@v1.1.1/modules/db/dialect/sqlite.go (about)

     1  // Copyright 2019 GoAdmin Core Team. All rights reserved.
     2  // Use of this source code is governed by a Apache-2.0 style
     3  // license that can be found in the LICENSE file.
     4  
     5  package dialect
     6  
     7  type sqlite struct {
     8  	commonDialect
     9  }
    10  
    11  func (sqlite) GetName() string {
    12  	return "sqlite"
    13  }
    14  
    15  func (sqlite) ShowColumns(table string) string {
    16  	return "PRAGMA table_info(" + table + ");"
    17  }
    18  
    19  func (sqlite) ShowTables() string {
    20  	return "SELECT name as tablename FROM sqlite_master WHERE type ='table'"
    21  }