@@ -440,7 +440,10 @@ func (c *conn) Version(context.Context) (_ string, err error) {
440440
441441func (c * conn ) IsTableExists (ctx context.Context , tableName string ) (tableExists bool , err error ) {
442442 tableName = c .normalizePath (tableName )
443- tableExists , err = helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
443+ tableExists , err = helpers .IsEntryExists (ctx ,
444+ c .connector .parent .Scheme (), tableName ,
445+ scheme .EntryTable , scheme .EntryColumnTable ,
446+ )
444447 if err != nil {
445448 return false , xerrors .WithStackTrace (err )
446449 }
@@ -449,7 +452,10 @@ func (c *conn) IsTableExists(ctx context.Context, tableName string) (tableExists
449452
450453func (c * conn ) IsColumnExists (ctx context.Context , tableName , columnName string ) (columnExists bool , err error ) {
451454 tableName = c .normalizePath (tableName )
452- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
455+ tableExists , err := helpers .IsEntryExists (ctx ,
456+ c .connector .parent .Scheme (), tableName ,
457+ scheme .EntryTable , scheme .EntryColumnTable ,
458+ )
453459 if err != nil {
454460 return false , xerrors .WithStackTrace (err )
455461 }
@@ -478,7 +484,10 @@ func (c *conn) IsColumnExists(ctx context.Context, tableName, columnName string)
478484
479485func (c * conn ) GetColumns (ctx context.Context , tableName string ) (columns []string , err error ) {
480486 tableName = c .normalizePath (tableName )
481- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
487+ tableExists , err := helpers .IsEntryExists (ctx ,
488+ c .connector .parent .Scheme (), tableName ,
489+ scheme .EntryTable , scheme .EntryColumnTable ,
490+ )
482491 if err != nil {
483492 return nil , xerrors .WithStackTrace (err )
484493 }
@@ -504,7 +513,10 @@ func (c *conn) GetColumns(ctx context.Context, tableName string) (columns []stri
504513
505514func (c * conn ) GetColumnType (ctx context.Context , tableName , columnName string ) (dataType string , err error ) {
506515 tableName = c .normalizePath (tableName )
507- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
516+ tableExists , err := helpers .IsEntryExists (ctx ,
517+ c .connector .parent .Scheme (), tableName ,
518+ scheme .EntryTable , scheme .EntryColumnTable ,
519+ )
508520 if err != nil {
509521 return "" , xerrors .WithStackTrace (err )
510522 }
@@ -541,7 +553,10 @@ func (c *conn) GetColumnType(ctx context.Context, tableName, columnName string)
541553
542554func (c * conn ) GetPrimaryKeys (ctx context.Context , tableName string ) (pkCols []string , err error ) {
543555 tableName = c .normalizePath (tableName )
544- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
556+ tableExists , err := helpers .IsEntryExists (ctx ,
557+ c .connector .parent .Scheme (), tableName ,
558+ scheme .EntryTable , scheme .EntryColumnTable ,
559+ )
545560 if err != nil {
546561 return nil , xerrors .WithStackTrace (err )
547562 }
@@ -565,7 +580,10 @@ func (c *conn) GetPrimaryKeys(ctx context.Context, tableName string) (pkCols []s
565580
566581func (c * conn ) IsPrimaryKey (ctx context.Context , tableName , columnName string ) (ok bool , err error ) {
567582 tableName = c .normalizePath (tableName )
568- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
583+ tableExists , err := helpers .IsEntryExists (ctx ,
584+ c .connector .parent .Scheme (), tableName ,
585+ scheme .EntryTable , scheme .EntryColumnTable ,
586+ )
569587 if err != nil {
570588 return false , xerrors .WithStackTrace (err )
571589 }
@@ -701,7 +719,10 @@ func (c *conn) GetAllTables(ctx context.Context, folder string) (tables []string
701719
702720func (c * conn ) GetIndexes (ctx context.Context , tableName string ) (indexes []string , err error ) {
703721 tableName = c .normalizePath (tableName )
704- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
722+ tableExists , err := helpers .IsEntryExists (ctx ,
723+ c .connector .parent .Scheme (), tableName ,
724+ scheme .EntryTable , scheme .EntryColumnTable ,
725+ )
705726 if err != nil {
706727 return nil , xerrors .WithStackTrace (err )
707728 }
@@ -728,7 +749,10 @@ func (c *conn) GetIndexes(ctx context.Context, tableName string) (indexes []stri
728749
729750func (c * conn ) GetIndexColumns (ctx context.Context , tableName , indexName string ) (columns []string , err error ) {
730751 tableName = c .normalizePath (tableName )
731- tableExists , err := helpers .IsTableExists (ctx , c .connector .parent .Scheme (), tableName )
752+ tableExists , err := helpers .IsEntryExists (ctx ,
753+ c .connector .parent .Scheme (), tableName ,
754+ scheme .EntryTable , scheme .EntryColumnTable ,
755+ )
732756 if err != nil {
733757 return nil , xerrors .WithStackTrace (err )
734758 }
0 commit comments