Remove unused codec interface file
This commit is contained in:
parent
25c86a49da
commit
c06f111580
13 changed files with 0 additions and 429 deletions
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlAll struct{}
|
||||
|
||||
func (x extSqlAll) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlAll) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlAsc struct{}
|
||||
|
||||
func (x extSqlAsc) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlAsc) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlDesc struct{}
|
||||
|
||||
func (x extSqlDesc) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlDesc) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlEmpty struct{}
|
||||
|
||||
func (x extSqlEmpty) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlEmpty) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
|
||||
"github.com/abcum/surreal/sql"
|
||||
)
|
||||
|
||||
type extSqlField struct{}
|
||||
|
||||
func (x extSqlField) ReadExt(dst interface{}, src []byte) {
|
||||
buf := bytes.NewBuffer(src)
|
||||
dec := gob.NewDecoder(buf)
|
||||
dec.Decode(dst.(*sql.Field))
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlField) WriteExt(src interface{}) (dst []byte) {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
switch obj := src.(type) {
|
||||
case sql.Field:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
case *sql.Field:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
}
|
||||
return buf.Bytes()
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
|
||||
"github.com/abcum/surreal/sql"
|
||||
)
|
||||
|
||||
type extSqlGroup struct{}
|
||||
|
||||
func (x extSqlGroup) ReadExt(dst interface{}, src []byte) {
|
||||
buf := bytes.NewBuffer(src)
|
||||
dec := gob.NewDecoder(buf)
|
||||
dec.Decode(dst.(*sql.Group))
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlGroup) WriteExt(src interface{}) (dst []byte) {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
switch obj := src.(type) {
|
||||
case sql.Group:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
case *sql.Group:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
}
|
||||
return buf.Bytes()
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import "github.com/abcum/surreal/sql"
|
||||
|
||||
type extSqlIdent struct{}
|
||||
|
||||
func (x extSqlIdent) ReadExt(dst interface{}, src []byte) {
|
||||
dst.(*sql.Ident).ID = string(src)
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlIdent) WriteExt(src interface{}) (dst []byte) {
|
||||
switch obj := src.(type) {
|
||||
case sql.Ident:
|
||||
dst = []byte(obj.ID)
|
||||
case *sql.Ident:
|
||||
dst = []byte(obj.ID)
|
||||
}
|
||||
return
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlNull struct{}
|
||||
|
||||
func (x extSqlNull) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlNull) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
|
||||
"github.com/abcum/surreal/sql"
|
||||
)
|
||||
|
||||
type extSqlOrder struct{}
|
||||
|
||||
func (x extSqlOrder) ReadExt(dst interface{}, src []byte) {
|
||||
buf := bytes.NewBuffer(src)
|
||||
dec := gob.NewDecoder(buf)
|
||||
dec.Decode(dst.(*sql.Order))
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlOrder) WriteExt(src interface{}) (dst []byte) {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
switch obj := src.(type) {
|
||||
case sql.Order:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
case *sql.Order:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
}
|
||||
return buf.Bytes()
|
||||
}
|
|
@ -1,34 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import "github.com/abcum/surreal/sql"
|
||||
|
||||
type extSqlTable struct{}
|
||||
|
||||
func (x extSqlTable) ReadExt(dst interface{}, src []byte) {
|
||||
dst.(*sql.Table).TB = string(src)
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlTable) WriteExt(src interface{}) (dst []byte) {
|
||||
switch obj := src.(type) {
|
||||
case sql.Table:
|
||||
dst = []byte(obj.TB)
|
||||
case *sql.Table:
|
||||
dst = []byte(obj.TB)
|
||||
}
|
||||
return
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"encoding/gob"
|
||||
|
||||
"github.com/abcum/surreal/sql"
|
||||
)
|
||||
|
||||
type extSqlThing struct{}
|
||||
|
||||
func (x extSqlThing) ReadExt(dst interface{}, src []byte) {
|
||||
buf := bytes.NewBuffer(src)
|
||||
dec := gob.NewDecoder(buf)
|
||||
dec.Decode(dst.(*sql.Thing))
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlThing) WriteExt(src interface{}) (dst []byte) {
|
||||
buf := bytes.NewBuffer(nil)
|
||||
switch obj := src.(type) {
|
||||
case sql.Thing:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
case *sql.Thing:
|
||||
enc := gob.NewEncoder(buf)
|
||||
enc.Encode(obj)
|
||||
}
|
||||
return buf.Bytes()
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
type extSqlVoid struct{}
|
||||
|
||||
func (x extSqlVoid) ReadExt(dst interface{}, src []byte) {
|
||||
return
|
||||
}
|
||||
|
||||
func (x extSqlVoid) WriteExt(src interface{}) (dst []byte) {
|
||||
return []byte{0x00}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
// Copyright © 2016 Abcum Ltd
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
package pack
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type extTime struct{}
|
||||
|
||||
func (x extTime) ReadExt(dst interface{}, src []byte) {
|
||||
dst.(*time.Time).UnmarshalBinary(src)
|
||||
}
|
||||
|
||||
func (x extTime) WriteExt(src interface{}) (dst []byte) {
|
||||
switch obj := src.(type) {
|
||||
case time.Time:
|
||||
dst, _ = obj.MarshalBinary()
|
||||
case *time.Time:
|
||||
dst, _ = obj.MarshalBinary()
|
||||
}
|
||||
return
|
||||
}
|
Loading…
Reference in a new issue